]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/27898 (Compile failure with --combine and anonymous structures)
authorJakub Jelinek <jakub@redhat.com>
Wed, 25 Mar 2009 07:58:55 +0000 (08:58 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 25 Mar 2009 07:58:55 +0000 (08:58 +0100)
PR c/27898
* gcc.dg/pr27898.c: New test.

PR tree-optimization/32139
* gcc.c-torture/compile/pr32139.c: New test.

From-SVN: r145052

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr32139.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr27898.c [new file with mode: 0644]

index ecb30d0995723620ef1b12563bde843d740eb7d1..c695f47ca7e762e75adfdab8133ae4f0d1c8c4d0 100644 (file)
 2009-03-07  Jan Hubicka  <jh@suse.cz>
 
        PR target/39361
-       * tree-inline.c (setup_one_parameter): Do replacement of const argument
-       by constant in SSA form.
+       * tree-inline.c (setup_one_parameter): Do replacement of const
+       argument by constant in SSA form.
 
 2009-03-07  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
index fdb786b64950ef21212ef8b61c1f905965f717f8..11b2ae3600208b166a6e2276a78c2d7fd8a8c1d2 100644 (file)
@@ -1,3 +1,11 @@
+2009-03-25  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/27898
+       * gcc.dg/pr27898.c: New test.
+
+       PR tree-optimization/32139
+       * gcc.c-torture/compile/pr32139.c: New test.
+
 2009-03-24  Jason Merrill  <jason@redhat.com>
 
        PR c++/28274
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32139.c b/gcc/testsuite/gcc.c-torture/compile/pr32139.c
new file mode 100644 (file)
index 0000000..7b8522f
--- /dev/null
@@ -0,0 +1,11 @@
+/* PR tree-optimization/32139 */
+int foo (void);
+int bar (void) __attribute__ ((const));
+
+int
+test (int x)
+{
+  int a = (x == 10000 ? foo : bar) ();
+  int b = (x == 10000 ? foo : bar) ();
+  return a + b;
+}
diff --git a/gcc/testsuite/gcc.dg/pr27898.c b/gcc/testsuite/gcc.dg/pr27898.c
new file mode 100644 (file)
index 0000000..bb7cce1
--- /dev/null
@@ -0,0 +1,8 @@
+/* PR c/27898 */
+/* { dg-do compile } */
+/* { dg-options "--combine" } */
+/* { dg-additional-sources "pr27898.c" } */
+
+union u { struct { int i; }; };
+
+extern int foo (union u *);