Commit 71ff73f3 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/45066 (ICE in namelist read in snapshot of 7/24/2010)

2010-07-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/45066
        * trans-io.c (build_dt): Use NULL_TREE rather than NULL
        for call to transfer_namelist_element.
        * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
        for -fwhole-file.

2010-07-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/45066
        * gfortran.dg/namelist_62.f90: New.

From-SVN: r162532
parent aa622bf1
2010-07-26 Tobias Burnus <burnus@net-b.de>
PR fortran/45066
* trans-io.c (build_dt): Use NULL_TREE rather than NULL
for call to transfer_namelist_element.
* trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
for -fwhole-file.
2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org> 2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/40628 PR fortran/40628
......
...@@ -1150,7 +1150,8 @@ gfc_get_symbol_decl (gfc_symbol * sym) ...@@ -1150,7 +1150,8 @@ gfc_get_symbol_decl (gfc_symbol * sym)
true); true);
if (sym->ts.type == BT_CHARACTER) if (sym->ts.type == BT_CHARACTER)
sym->ts.u.cl->backend_decl = s->ts.u.cl->backend_decl; sym->ts.u.cl->backend_decl = s->ts.u.cl->backend_decl;
return s->backend_decl; sym->backend_decl = s->backend_decl;
return sym->backend_decl;
} }
} }
} }
......
...@@ -1760,7 +1760,7 @@ build_dt (tree function, gfc_code * code) ...@@ -1760,7 +1760,7 @@ build_dt (tree function, gfc_code * code)
for (nml = dt->namelist->namelist; nml; nml = nml->next) for (nml = dt->namelist->namelist; nml; nml = nml->next)
transfer_namelist_element (&block, nml->sym->name, nml->sym, transfer_namelist_element (&block, nml->sym->name, nml->sym,
NULL, NULL); NULL, NULL_TREE);
} }
else else
set_parameter_const (&block, var, IOPARM_common_flags, mask); set_parameter_const (&block, var, IOPARM_common_flags, mask);
......
2010-07-26 Tobias Burnus <burnus@net-b.de>
PR fortran/45066
* gfortran.dg/namelist_62.f90: New.
2010-07-26 Richard Guenther <rguenther@suse.de> 2010-07-26 Richard Guenther <rguenther@suse.de>
* gcc.c-torture/execute/pr45017.c: Move ... * gcc.c-torture/execute/pr45017.c: Move ...
......
! { dg-do compile }
!
! PR fortran/45066
!
! Contributed by Michael Richmond.
!
! Was failing due to a -fwhole-file bug.
!
MODULE GA_commons
INTEGER :: nichflg(2)
END MODULE GA_commons
PROGRAM gafortran
USE GA_commons
NAMELIST /ga/ nichflg
READ (23, nml=ga)
END PROGRAM gafortran
! { dg-final { cleanup-modules "ga_commons" } }
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