decl.c (gfc_match_derived_decl): Dummy argument cannot be a derived type.
2019-06-15 Steven G. Kargl <kargl@gcc.gnu.org> * decl.c (gfc_match_derived_decl): Dummy argument cannot be a derived type. 2019-06-15 Steven G. Kargl <kargl@gcc.gnu.org> * gfortran.dg/dummy_derived_typed.f90: New test. From-SVN: r272333
This commit is contained in:
parent
98e5be211e
commit
e00e195414
|
@ -1,3 +1,8 @@
|
||||||
|
2019-06-15 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
|
* decl.c (gfc_match_derived_decl): Dummy argument cannot be a derived
|
||||||
|
type.
|
||||||
|
|
||||||
2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
|
2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
* arith.c (arith_power): Rework overflow of an integer to an integer
|
* arith.c (arith_power): Rework overflow of an integer to an integer
|
||||||
|
|
|
@ -10193,6 +10193,13 @@ gfc_match_derived_decl (void)
|
||||||
&& !gfc_add_function (&gensym->attr, gensym->name, NULL))
|
&& !gfc_add_function (&gensym->attr, gensym->name, NULL))
|
||||||
return MATCH_ERROR;
|
return MATCH_ERROR;
|
||||||
|
|
||||||
|
if (gensym->attr.dummy)
|
||||||
|
{
|
||||||
|
gfc_error ("Dummy argument %qs at %L cannot be a derived type at %C",
|
||||||
|
name, &gensym->declared_at);
|
||||||
|
return MATCH_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
sym = gfc_find_dt_in_generic (gensym);
|
sym = gfc_find_dt_in_generic (gensym);
|
||||||
|
|
||||||
if (sym && (sym->components != NULL || sym->attr.zero_comp))
|
if (sym && (sym->components != NULL || sym->attr.zero_comp))
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2019-06-15 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
|
* gfortran.dg/dummy_derived_typed.f90: New test.
|
||||||
|
|
||||||
2019-06-15 Jan Hubicka <hubicka@ucw.cz>
|
2019-06-15 Jan Hubicka <hubicka@ucw.cz>
|
||||||
|
|
||||||
* gcc.dg/tree-ssa/alias-access-path-2.c: New testcase.
|
* gcc.dg/tree-ssa/alias-access-path-2.c: New testcase.
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
! { dg-do compile }
|
||||||
|
subroutine s(t) ! { dg-error "Dummy argument" }
|
||||||
|
type t ! { dg-error "cannot be a derived" }
|
||||||
|
end type ! { dg-error "Expecting END SUBROUTINE" }
|
||||||
|
end
|
Loading…
Reference in New Issue