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
+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.
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
--- /dev/null
+/* 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;
+}