**ping**
On 04/09/2020 08:35, Mark Eggleston wrote:
Please find attached a fix for PR95614. The original patch was by
Steve Kargl.
The original patch resulted in name clashes between global identifiers
naming common blocks and local identifiers. According to the 2018
standard 19.3.1 Classes of local identifiers, item 2, a local
identifier shall not be the same as a global identifier, however,
there is an exception where the global identifier is a common block name.
The change to the patch is:
if (gsym && gsym->type != GSYM_UNKNOWN && gsym->type != GSYM_COMMON)
instead of:
if (gsym && gsym->type != GSYM_UNKNOWN)
Tested on x86_64 using make -j 8 check-fortran.
OK to commit?
[PATCH] Fortran : ICE in build_field PR95614
Local identifiers can not be the same as a module name. Original
patch by Steve Kargl resulted in name clashes between common block
names and local identifiers. A local identifier can be the same as
a global identier if that identifier represents a common. The patch
was modified to allow global identifiers that represent a common
block.
2020-09-04 Steven G. Kargl <ka...@gcc.gnu.org>
Mark Eggleston <markeggles...@gcc.gnu.org>
gcc/fortran/
PR fortran/95614
* decl.c (gfc_get_common): Use gfc_match_common_name instead
of match_common_name.
* decl.c (gfc_bind_idents): Use gfc_match_common_name instead
of match_common_name.
* match.c : Rename match_common_name to gfc_match_common_name.
* match.c (gfc_match_common): Use gfc_match_common_name instead
of match_common_name.
* match.h : Rename match_common_name to gfc_match_common_name.
* resolve.c (resolve_common_vars): Check each symbol in a
common block has a global symbol. If there is a global symbol
issue an error if the symbol type is known as is not a common
block name.
2020-09-04 Mark Eggleston <markeggles...@gcc.gnu.org>
gcc/testsuite/
PR fortran/95614
* gfortran.dg/pr95614_1.f90: New test.
* gfortran.dg/pr95614_2.f90: New test.
--
https://www.codethink.co.uk/privacy.html