diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ecb30d09957..c695f47ca7e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -448,8 +448,8 @@ 2009-03-07 Jan Hubicka 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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fdb786b6495..11b2ae36002 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2009-03-25 Jakub Jelinek + + 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 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 index 00000000000..7b8522f5174 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr32139.c @@ -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 index 00000000000..bb7cce17550 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr27898.c @@ -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 *);