This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/64925] ICE with same names for dummy arg and internal procedure
- From: "kargl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Feb 2015 20:10:27 +0000
- Subject: [Bug fortran/64925] ICE with same names for dummy arg and internal procedure
- Auto-submitted: auto-generated
- References: <bug-64925-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64925
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-02-03
CC| |kargl at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from kargl at gcc dot gnu.org ---
Here's patch. Not sure if it is completely correct.
Index: symbol.c
===================================================================
--- symbol.c (revision 220347)
+++ symbol.c (working copy)
@@ -458,6 +458,11 @@ check_conflict (symbol_attribute *attr,
}
}
+ if (attr->dummy && ((attr->function || attr->subroutine) &&
+ gfc_current_state () == COMP_CONTAINS))
+ gfc_error_now ("internal procedure '%s' at %L conflicts with "
+ "DUMMY argument", name, where);
+
conf (dummy, entry);
conf (dummy, intrinsic);
conf (dummy, threadprivate);
% gfc5x -c bl.f90
bl.f90:9:25:
integer function ccc(i)
1
Error: internal procedure 'ccc' at (1) conflicts with DUMMY argument