PR fortran/95611 - ICE in access_attr_decl, at fortran/decl.c:9075
When reporting a duplicate access specification of an operator, refer to the proper symbol. 2020-06-11 Harald Anlauf <anlauf@gmx.de> gcc/fortran/ PR fortran/95611 * decl.c (access_attr_decl): Use correct symbol in error message. Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
This commit is contained in:
parent
7fd614ee81
commit
393ccb7256
@ -9073,7 +9073,7 @@ access_attr_decl (gfc_statement st)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
gfc_error ("Access specification of the .%s. operator at %C "
|
gfc_error ("Access specification of the .%s. operator at %C "
|
||||||
"has already been specified", sym->name);
|
"has already been specified", uop->name);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
7
gcc/testsuite/gfortran.dg/pr95611.f90
Normal file
7
gcc/testsuite/gfortran.dg/pr95611.f90
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
! { dg-do compile }
|
||||||
|
! PR fortran/95611 - ICE in access_attr_decl, at fortran/decl.c:9075
|
||||||
|
|
||||||
|
module m
|
||||||
|
public operator (.a.)
|
||||||
|
public operator (.a.) ! { dg-error "has already been specified" }
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue
Block a user