2012-08-24 Jakub Jelinek <jakub@redhat.com>
PR c/54363
* gimplify.c (optimize_compound_literals_in_ctor): Only recurse
if init is a CONSTRUCTOR.
* gcc.dg/pr54363.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@190898
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-09-03 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2012-08-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/54363
+ * gimplify.c (optimize_compound_literals_in_ctor): Only recurse
+ if init is a CONSTRUCTOR.
+
2012-09-02 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/54369
2012-09-02 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/54369
if (!TREE_ADDRESSABLE (value)
&& !TREE_ADDRESSABLE (decl)
if (!TREE_ADDRESSABLE (value)
&& !TREE_ADDRESSABLE (decl)
+ && init
+ && TREE_CODE (init) == CONSTRUCTOR)
newval = optimize_compound_literals_in_ctor (init);
}
if (newval == value)
newval = optimize_compound_literals_in_ctor (init);
}
if (newval == value)
+2012-09-03 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2012-08-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/54363
+ * gcc.dg/pr54363.c: New test.
+
2012-08-31 Ollie Wild <aaw@google.com>
PR c++/54197
2012-08-31 Ollie Wild <aaw@google.com>
PR c++/54197
--- /dev/null
+/* PR c/54363 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99" } */
+
+struct S { char **a; };
+
+void
+test (void)
+{
+ struct S b = { .a = (char **) { "a", "b" } }; /* { dg-warning "(initialization|excess elements)" } */
+ struct S c = { .a = (char *[]) { "a", "b" } };
+}