[Patch, fortran] PR44945 - [4.6 Regression] Wrong decl for module vars and PR45077
Paul Richard Thomas
paul.richard.thomas@gmail.com
Sun Feb 20 15:05:00 GMT 2011
The comment before trans-decl.c:gfc_get_module_backend_decl describes
the main features of this patch. The key functional change is that a
gsymbol is created for modules that are compiled separately and
symbols added to its namespace, in order to access the same
backend_decl for all use associations.
The testcases really only check the fix for pr45077, although the
mechanism that fixes pr44945 is tested. This is because PR44945 does
not cause a failure for all platforms, or perhaps none at all, as far
as Tobias and I can determine. The patch ensures that only one
declaration is used in all circumstances.
Bootstraps and regtests on FC9/x86_64 - OK for trunk?
Paul
2011-02-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/45077
PR fortran/44945
* trans-types.c (gfc_get_derived_type): Remove code that looks
for decls in gsym and add call to gfc_get_module_backend_decl.
* trans.h : Add prototype for gfc_get_module_backend_decl.
* trans-decl.c (gfc_get_module_backend_decl): New function.
(gfc_get_symbol_decl): Call it.
2011-02-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/45077
PR fortran/44945
* gfortran.dg/whole_file_28.f90 : New test.
* gfortran.dg/whole_file_29.f90 : New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 7888 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110220/331cca70/attachment.bin>
More information about the Gcc-patches
mailing list