aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/primary.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2009-04-03 20:26:44 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2009-04-03 20:26:44 +0200
commit6f9c9d6d47751e980f0ca831f02e91c0ac424916 (patch)
tree451145da8c0a68c2c7cd489efba1be949fab4f36 /gcc/fortran/primary.c
parentb77ba909af773561e808c3d7cf64c46a8112dcab (diff)
downloadgcc-6f9c9d6d47751e980f0ca831f02e91c0ac424916.zip
gcc-6f9c9d6d47751e980f0ca831f02e91c0ac424916.tar.gz
gcc-6f9c9d6d47751e980f0ca831f02e91c0ac424916.tar.bz2
re PR fortran/39594 (compiler falls over in gfc_get_symbol_decl)
2009-04-03 Tobias Burnus <burnus@net-b.de> PR fortran/39594 * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol if it is not a procedure pointer. * primary.c (match_actual_arg): Ditto. 2009-04-03 Tobias Burnus <burnus@net-b.de> PR fortran/39594 * gfortran.dg/common_12.f90: New. From-SVN: r145513
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r--gcc/fortran/primary.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index c7ca861..cb6f988 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -1401,6 +1401,13 @@ match_actual_arg (gfc_expr **result)
&& sym->attr.flavor != FL_UNKNOWN)
break;
+ if (sym->attr.in_common && !sym->attr.proc_pointer)
+ {
+ gfc_add_flavor (&sym->attr, FL_VARIABLE, sym->name,
+ &sym->declared_at);
+ break;
+ }
+
/* If the symbol is a function with itself as the result and
is being defined, then we have a variable. */
if (sym->attr.function && sym->result == sym)