Commit abc67de1 by Simon Martin Committed by Jason Merrill

re PR c++/28266 (ICE on invalid default variable)

        PR c++/28266
        * gimplify.c (gimplify_target_expr): Make sure that the TARGET_EXPR is
        expanded only once even if an error occurs.

From-SVN: r121288
parent ff5157e5
2007-01-29 Simon Martin <simartin@users.sourceforge.net>
PR c++/28266
* gimplify.c (gimplify_target_expr): Make sure that the TARGET_EXPR is
expanded only once even if an error occurs.
2007-01-29 Ben Elliston <bje@au.ibm.com>
* gcov-io.h (__gcov_indirect_call_profiler): Declare.
......
......@@ -4300,7 +4300,11 @@ gimplify_target_expr (tree *expr_p, tree *pre_p, tree *post_p)
fb_none);
}
if (ret == GS_ERROR)
return GS_ERROR;
{
/* PR c++/28266 Make sure this is expanded only once. */
TARGET_EXPR_INITIAL (targ) = NULL_TREE;
return GS_ERROR;
}
append_to_statement_list (init, pre_p);
/* If needed, push the cleanup for the temp. */
......
2007-01-29 Simon Martin <simartin@users.sourceforge.net>
PR c++/28266
* g++.dg/parse/defarg12.C: New test.
2007-01-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30554
/* PR28266 This used to ICE in gimple_add_tmp_var */
/* { dg-do "compile" } */
struct A
{
int i;
A(int = X); /* { dg-error "was not declared in this scope" }*/
};
void foo()
{
A().i;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment