re PR fortran/45756 (Multiple DECL for array valued PARAMETER (-fwhole-file issue))

2010-09-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/45756
        * trans-decl.c (gfc_get_symbol_decl): Use gsym for decl of
        module parameters.

From-SVN: r164686
This commit is contained in:
Tobias Burnus 2010-09-28 17:33:56 +02:00 committed by Tobias Burnus
parent 2268453b5c
commit 4ed5664e90
2 changed files with 15 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2010-09-28 Tobias Burnus <burnus@net-b.de>
PR fortran/45756
* trans-decl.c (gfc_get_symbol_decl): Use gsym for decl of
module parameters.
2010-09-27 Tobias Burnus <burnus@net-b.de>
PR fortran/40569

View File

@ -1133,11 +1133,18 @@ gfc_get_symbol_decl (gfc_symbol * sym)
if (sym->backend_decl)
return sym->backend_decl;
/* Special case for array-valued named constants from intrinsic
procedures; those are inlined. */
if (sym->attr.use_assoc && sym->from_intmod
&& sym->attr.flavor == FL_PARAMETER)
intrinsic_array_parameter = true;
/* If use associated and whole file compilation, use the module
declaration. */
if (gfc_option.flag_whole_file
&& sym->attr.flavor == FL_VARIABLE
&& sym->attr.use_assoc
&& (sym->attr.flavor == FL_VARIABLE
|| sym->attr.flavor == FL_PARAMETER)
&& sym->attr.use_assoc && !intrinsic_array_parameter
&& sym->module)
{
gfc_gsymbol *gsym;
@ -1182,12 +1189,6 @@ gfc_get_symbol_decl (gfc_symbol * sym)
if (sym->attr.intrinsic)
internal_error ("intrinsic variable which isn't a procedure");
/* Special case for array-valued named constants from intrinsic
procedures; those are inlined. */
if (sym->attr.use_assoc && sym->from_intmod && sym->attr.dimension
&& sym->attr.flavor == FL_PARAMETER)
intrinsic_array_parameter = true;
/* Create string length decl first so that they can be used in the
type declaration. */
if (sym->ts.type == BT_CHARACTER)