[Bug fortran/50379] ICE in gfc_typenode_for_spec at fortran/trans-types.c
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 13 13:14:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50379
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
--- Comment #3 from janus at gcc dot gnu.org 2011-09-13 13:08:53 UTC ---
One way to reject it would be:
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 178778)
+++ gcc/fortran/resolve.c (working copy)
@@ -10567,6 +10567,12 @@
"in '%s' at %L", sym->name, &sym->declared_at);
return FAILURE;
}
+ if (sym->attr.generic && sym->attr.result)
+ {
+ gfc_error ("GENERIC attribute conflicts with RESULT attribute "
+ "in '%s' at %L", sym->name, &sym->declared_at);
+ return FAILURE;
+ }
if (sym->attr.external && sym->attr.function
&& ((sym->attr.if_source == IFSRC_DECL && !sym->attr.procedure)
|| sym->attr.contained))
More information about the Gcc-bugs
mailing list