[PATCH] PR fortran/82992 -- Check for conflicting symbols
Steve Kargl
sgk@troutmask.apl.washington.edu
Thu Aug 15 21:45:00 GMT 2019
The attached patch has be regression tested on x86_64-*-freebsd.
The testcase in the PR explains what the patch does.
% cat z1.f90
subroutine sub (x)
use iso_fortran_env, only: x => character_kinds
end
% gfcx -c a.f90
a.f90:1:17:
1 | subroutine sub (x)
| 1
2 | use iso_fortran_env, only: x => character_kinds
| 2
Error: Symbol 'x' at (1) conflicts with the rename symbol at (2)
OK to commit?
2019-08-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82992
* module.c (gfc_match_use): When renaming a module entity, search
current namespace for conflicting symbol.
2019-08-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82992
* gfortran.dg/pr71649.f90: Adjust error messages.
* gfortran.dg/use_15.f90: Ditto.
* gfortran.dg/use_rename_8.f90: Ditto.
--
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr82992.diff
Type: text/x-diff
Size: 4113 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190815/fd289b89/attachment.bin>
More information about the Gcc-patches
mailing list