This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/61450] ICE in gfc_global_used()
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 14 Nov 2015 11:55:08 +0000
- Subject: [Bug fortran/61450] ICE in gfc_global_used()
- Auto-submitted: auto-generated
- References: <bug-61450-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61450
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
With the updated patch below the ICE is now replaced with
pr61450.f90:6:15:
integer i1
2
bind(c,name="foo") :: i1
end module
subroutine truc() bind(c,name="foo")
1
Error: Global binding name 'foo' at (1) is already being used at (2)
Any reason why the original patch has been delayed for more than a year?
If it helps, I can take care of the packaging.
Dominique
--- ../_clean/gcc/fortran/parse.c 2015-11-11 15:23:35.000000000 +0100
+++ gcc/fortran/parse.c 2015-11-14 12:49:41.000000000 +0100
@@ -5237,33 +5237,32 @@ gfc_global_used (gfc_gsymbol *sym, locus
switch(sym->type)
{
case GSYM_PROGRAM:
- name = "PROGRAM";
+ name = "as a PROGRAM ";
break;
case GSYM_FUNCTION:
- name = "FUNCTION";
+ name = "as a FUNCTION ";
break;
case GSYM_SUBROUTINE:
- name = "SUBROUTINE";
+ name = "as a SUBROUTINE ";
break;
case GSYM_COMMON:
- name = "COMMON";
+ name = "as a COMMON ";
break;
case GSYM_BLOCK_DATA:
- name = "BLOCK DATA";
+ name = "as a BLOCK DATA ";
break;
case GSYM_MODULE:
- name = "MODULE";
+ name = "as a MODULE ";
break;
default:
- gfc_internal_error ("gfc_global_used(): Bad type");
- name = NULL;
+ name = "";
}
if (sym->binding_label)
- gfc_error ("Global binding name %qs at %L is already being used as a %s "
+ gfc_error ("Global binding name %qs at %L is already being used %s"
"at %L", sym->binding_label, where, name, &sym->where);
else
- gfc_error ("Global name %qs at %L is already being used as a %s at %L",
+ gfc_error ("Global name %qs at %L is already being used %sat %L",
sym->name, where, name, &sym->where);
}