diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2008-01-06 22:00:00 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2008-01-06 22:00:00 +0000 |
commit | 5989df83be8402add1f7cad75ee98e7a8ac2dbda (patch) | |
tree | 90e6a3b9a4e806e921bd4b2e4e0dfd7151225906 /gcc/fortran/module.c | |
parent | b8c9ec3da0d37a2b29715bb91b847b1e5dc188c5 (diff) | |
download | gcc-5989df83be8402add1f7cad75ee98e7a8ac2dbda.zip gcc-5989df83be8402add1f7cad75ee98e7a8ac2dbda.tar.gz gcc-5989df83be8402add1f7cad75ee98e7a8ac2dbda.tar.bz2 |
re PR fortran/34545 (ICE when compiling Fortran 95 code)
2008-01-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34545
* module.c (load_needed): If the namespace has no proc_name
give it the module symbol.
2008-01-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34545
* gfortran.dg/use_12.f90: New test.
From-SVN: r131364
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index f3c54b7..20528cb 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -3525,6 +3525,12 @@ load_needed (pointer_info *p) associate_integer_pointer (q, ns); } + /* Use the module sym as 'proc_name' so that gfc_get_symbol_decl + doesn't go pear-shaped if the symbol is used. */ + if (!ns->proc_name) + gfc_find_symbol (p->u.rsym.module, gfc_current_ns, + 1, &ns->proc_name); + sym = gfc_new_symbol (p->u.rsym.true_name, ns); sym->module = gfc_get_string (p->u.rsym.module); strcpy (sym->binding_label, p->u.rsym.binding_label); |