diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2008-12-22 23:11:29 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-12-22 23:11:29 +0000 |
commit | 8a2725318babd06ccbb2a45d9d9cb699c75e4f38 (patch) | |
tree | 3be817e2bf6f632acf83f3112a07526352a5ceb7 /gcc | |
parent | 5d88d3be0af0c5b33951e71604459599b80d9a76 (diff) | |
download | gcc-8a2725318babd06ccbb2a45d9d9cb699c75e4f38.zip gcc-8a2725318babd06ccbb2a45d9d9cb699c75e4f38.tar.gz gcc-8a2725318babd06ccbb2a45d9d9cb699c75e4f38.tar.bz2 |
re PR fortran/35780 (internal compiler error for complicated PARAMETER expressions)
2008-12-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35780
* trans-decl.c (init_intent_out_dt): Allow for optional args.
From-SVN: r142889
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b3e3034..f727f80 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2008-12-22 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/35780 + * trans-decl.c (init_intent_out_dt): Allow for optional args. + 2008-12-21 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/38398 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 91db5df..af6d01a 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -2791,6 +2791,7 @@ init_intent_out_dt (gfc_symbol * proc_sym, tree body) stmtblock_t fnblock; gfc_formal_arglist *f; tree tmp; + tree present; gfc_init_block (&fnblock); for (f = proc_sym->formal; f; f = f->next) @@ -2802,6 +2803,11 @@ init_intent_out_dt (gfc_symbol * proc_sym, tree body) tmp = gfc_deallocate_alloc_comp (f->sym->ts.derived, f->sym->backend_decl, f->sym->as ? f->sym->as->rank : 0); + + present = gfc_conv_expr_present (f->sym); + tmp = build3 (COND_EXPR, TREE_TYPE (tmp), present, + tmp, build_empty_stmt ()); + gfc_add_expr_to_block (&fnblock, tmp); } |