diff options
author | Tobias Burnus <burnus@net-b.de> | 2010-07-28 10:44:29 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2010-07-28 10:44:29 +0200 |
commit | 57e15568e886ab57612d45618deb416c8f63eec2 (patch) | |
tree | f9566bf437c85c13c282f43e0684b3744d59c095 /gcc/fortran | |
parent | b4351367ce259b2ce74ba16a7c2437641a7d8d2a (diff) | |
download | gcc-57e15568e886ab57612d45618deb416c8f63eec2.zip gcc-57e15568e886ab57612d45618deb416c8f63eec2.tar.gz gcc-57e15568e886ab57612d45618deb416c8f63eec2.tar.bz2 |
re PR fortran/45077 (ICE with -fwhole-file in fold_convert_loc, at fold-const.c:2021)
2010-07-28 Tobias Burnus <burnus@net-b.de>
PR fortran/45077
* trans-types.c (gfc_get_derived_type): Fix DT declaration
from modules for whole-file mode.
2010-07-28 Tobias Burnus <burnus@net-b.de>
PR fortran/45077
* gfortran.dg/whole_file_24.f90: New.
From-SVN: r162619
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-types.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index fb49a8d..e0b73740 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2010-07-28 Tobias Burnus <burnus@net-b.de> + + PR fortran/45077 + * trans-types.c (gfc_get_derived_type): Fix DT declaration + from modules for whole-file mode. + 2010-07-27 Joseph Myers <joseph@codesourcery.com> * gfortran.h (gfc_handle_option): Update prototype and return diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 62b298c..b532788 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -1994,8 +1994,10 @@ gfc_get_derived_type (gfc_symbol * derived) gfc_symbol *s; s = NULL; gfc_find_symbol (derived->name, gsym->ns, 0, &s); - if (s && s->backend_decl) + if (s) { + if (!s->backend_decl) + s->backend_decl = gfc_get_derived_type (s); gfc_copy_dt_decls_ifequal (s, derived, true); goto copy_derived_types; } |