PR middle-end/35432
* gimplify.c (gimplify_modify_expr): Do not optimize zero-sized types
if want_value.
testsuite/
* gcc.c-torture/compile/pr35432.c: New file.
From-SVN: r138796
+2008-08-06 Aldy Hernandez <aldyh@redhat.com>
+
+ PR middle-end/35432
+ * gimplify.c (gimplify_modify_expr): Do not optimize
+ zero-sized types if want_value.
+
2008-07-04 Alan Modra <amodra@bigpond.net.au>
PR target/36634
side as statements and throw away the assignment. Do this after
gimplify_modify_expr_rhs so we handle TARGET_EXPRs of addressable
types properly. */
- if (zero_sized_type (TREE_TYPE (*from_p)))
+ if (zero_sized_type (TREE_TYPE (*from_p)) && !want_value)
{
gimplify_stmt (from_p);
gimplify_stmt (to_p);
+2008-08-06 Aldy Hernandez <aldyh@redhat.com>
+
+ PR middle-end/35432
+ * gcc.c-torture/compile/pr35432.c: New file.
+
2008-05-29 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/nested-func-6.c: New test.
--- /dev/null
+/* PR middle-end/35432 */
+
+struct A
+{
+ char c[0];
+};
+
+void foo(struct A a)
+{
+ (a = a).c;
+}