* trans-array.c (gfc_conv_array_parameter): Guard union access.
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 29 Nov 2008 19:53:01 +0000 (19:53 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 29 Nov 2008 19:53:01 +0000 (19:53 +0000)
From-SVN: r142283

gcc/fortran/ChangeLog
gcc/fortran/trans-array.c

index 834e7d0..020f11d 100644 (file)
@@ -1,3 +1,7 @@
+2008-11-29  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * trans-array.c (gfc_conv_array_parameter): Guard union access.
+
 2008-11-29  Janus Weil  <janus@gcc.gnu.org>
            Mikael Morin <mikael@gcc.gnu.org>
 
index 06d2e3d..2b23f15 100644 (file)
@@ -5206,7 +5206,8 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77,
   stmtblock_t block;
 
   full_array_var = (expr->expr_type == EXPR_VARIABLE
-                     && expr->ref->u.ar.type == AR_FULL);
+                   && expr->ref->type == REF_ARRAY
+                   && expr->ref->u.ar.type == AR_FULL);
   sym = full_array_var ? expr->symtree->n.sym : NULL;
 
   /* The symbol should have an array specification.  */