From 62f1d4705d0b042e13faad97ea12b665b4f3ad84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Schl=C3=BCter?= Date: Wed, 9 Jun 2004 14:55:50 +0200 Subject: re PR fortran/13372 (ICE in trans-types.c (gfc_typenode_for_spec), see #13201) fortran/ PR fortran/13372 * module.c (write_symbol, write_symtree): Don't write symbols wrongly added to namespace. * trans-decl.c (gfc_create_module_variable): Don't create a backend decl for a symbol incorrectly added to namespace. testsuite/ PR fortran/13372 * gfortran.fortran-torture/compile/named_args_2.f90: New test. From-SVN: r82834 --- gcc/fortran/module.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gcc/fortran/module.c') diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 09f9452..eace654 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -3137,6 +3137,13 @@ write_symbol (int n, gfc_symbol * sym) if (sym->attr.flavor == FL_UNKNOWN || sym->attr.flavor == FL_LABEL) gfc_internal_error ("write_symbol(): bad module symbol '%s'", sym->name); + + if (sym->attr.flavor == FL_VARIABLE && sym->ts.type == BT_UNKNOWN) + /* TODO: this is a workaround for some of the problems in PR15481, + and fixes the dependent bug PR13372. In an ideal frontend, this + should never happen. */ + return; + mio_integer (&n); mio_internal_string (sym->name); @@ -3260,6 +3267,12 @@ write_symtree (gfc_symtree * st) && !sym->attr.subroutine && !sym->attr.function)) return; + if (sym->attr.flavor == FL_VARIABLE && sym->ts.type == BT_UNKNOWN) + /* TODO: this is a workaround for some of the problems in PR15481, + and fixes the dependent bug PR13372. In an ideal frontend, this + should never happen. */ + return; + if (check_unique_name (st->name)) return; -- cgit v1.1