From e72a3c3197205e1b590835f626e31527b0ee37cd Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 25 Aug 2006 21:14:24 +0000 Subject: 2006-08-25 Fariborz Jahanian PR c/28418 * c-gimplify.c (gimplify_compound_literal_expr): Don't add variable again if DECL_SEEN_IN_BIND_EXPR_P. 2006-08-25 Joseph S. Myers * gcc.c-torture/compile/compound-literal-1.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@116436 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/gcc.c-torture/compile/compound-literal-1.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/compound-literal-1.c (limited to 'gcc/testsuite/gcc.c-torture') diff --git a/gcc/testsuite/gcc.c-torture/compile/compound-literal-1.c b/gcc/testsuite/gcc.c-torture/compile/compound-literal-1.c new file mode 100644 index 00000000000..968bb450a71 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/compound-literal-1.c @@ -0,0 +1,9 @@ +/* ICE incrementing compound literal: bug 28418 from Volker Reichelt + . */ + +struct A { int i; }; + +void foo() +{ + ((struct A) { 0 }).i += 1; +} -- cgit v1.2.3