Commit 3b9a3b48 by Harald Anlauf

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>
(cherry picked from commit 393ccb72566dc004b9ab5c3b8fb6fdca6c095812)
parent 800dac8f
......@@ -9058,7 +9058,7 @@ access_attr_decl (gfc_statement st)
else
{
gfc_error ("Access specification of the .%s. operator at %C "
"has already been specified", sym->name);
"has already been specified", uop->name);
goto done;
}
......
! { 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment