* trans-array.c (gfc_conv_array_parameter): Guard union access.

From-SVN: r142283
This commit is contained in:
Eric Botcazou 2008-11-29 19:53:01 +00:00 committed by Eric Botcazou
parent 44b55e85d2
commit 71690b03ab
2 changed files with 6 additions and 1 deletions

View 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>

View 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. */