mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-18 01:20:48 +08:00
re PR fortran/61450 (ICE in gfc_global_used())
2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/61450 * parse.c (gfc_global_used): Replace the gfc_internal_error with an error. 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/61450 * gfortran.dg/binding_label_tests_28.f90: New test. From-SVN: r253328
This commit is contained in:
parent
ce22a7f915
commit
efa1d7a216
gcc
@ -1,3 +1,9 @@
|
||||
2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
|
||||
|
||||
PR fortran/61450
|
||||
* parse.c (gfc_global_used): Replace the gfc_internal_error
|
||||
with an error.
|
||||
|
||||
2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
|
||||
|
||||
PR fortran/25071
|
||||
|
@ -5742,16 +5742,28 @@ gfc_global_used (gfc_gsymbol *sym, locus *where)
|
||||
name = "MODULE";
|
||||
break;
|
||||
default:
|
||||
gfc_internal_error ("gfc_global_used(): Bad type");
|
||||
name = NULL;
|
||||
}
|
||||
|
||||
if (sym->binding_label)
|
||||
gfc_error ("Global binding name %qs at %L is already being used as a %s "
|
||||
"at %L", sym->binding_label, where, name, &sym->where);
|
||||
if (name)
|
||||
{
|
||||
if (sym->binding_label)
|
||||
gfc_error ("Global binding name %qs at %L is already being used "
|
||||
"as a %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", sym->name, where, name, &sym->where);
|
||||
}
|
||||
else
|
||||
gfc_error ("Global name %qs at %L is already being used as a %s at %L",
|
||||
sym->name, where, name, &sym->where);
|
||||
{
|
||||
if (sym->binding_label)
|
||||
gfc_error ("Global binding name %qs at %L is already being used "
|
||||
"at %L", sym->binding_label, where, &sym->where);
|
||||
else
|
||||
gfc_error ("Global name %qs at %L is already being used at %L",
|
||||
sym->name, where, &sym->where);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
|
||||
|
||||
PR fortran/61450
|
||||
* gfortran.dg/binding_label_tests_28.f90: New test.
|
||||
|
||||
2017-09-30 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/65949
|
||||
|
12
gcc/testsuite/gfortran.dg/binding_label_tests_28.f90
Normal file
12
gcc/testsuite/gfortran.dg/binding_label_tests_28.f90
Normal file
@ -0,0 +1,12 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR fortran/61450
|
||||
! Contributed by Francois-Xavier Coudert <fxcoudert@gmail.com>
|
||||
!
|
||||
module p
|
||||
integer i1 ! { dg-error "Global binding name 'foo' at .1. is already being used at .2." }
|
||||
bind(c,name="foo") :: i1
|
||||
end module
|
||||
|
||||
subroutine truc() bind(c,name="foo") ! { dg-error "Global binding name 'foo' at .1. is already being used at .2." }
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user