diff options
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index fe966aa..f9d11be 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -1158,6 +1158,12 @@ resolve_structure_cons (gfc_expr *expr, int init) if (!cons->expr) continue; + /* Unions use an EXPR_NULL contrived expression to tell the translation + phase to generate an initializer of the appropriate length. + Ignore it here. */ + if (cons->expr->ts.type == BT_UNION && cons->expr->expr_type == EXPR_NULL) + continue; + if (!gfc_resolve_expr (cons->expr)) { t = false; |