diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f44708140de..41c09ff5a61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-02-18 Jakub Jelinek + + PR debug/47780 + * cfgexpand.c (expand_debug_expr) : Call copy_rtx to + avoid invalid rtx sharing. + 2011-02-18 Gerald Pfeifer * doc/cpp.texi (Obsolete Features): Add background on the diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 897d0f9f2b3..ee51ba9f9c0 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -3104,7 +3104,7 @@ expand_debug_expr (tree exp) gcc_assert (part >= 0 && (unsigned)part < SA.map->num_partitions); - op0 = SA.partition_to_pseudo[part]; + op0 = copy_rtx (SA.partition_to_pseudo[part]); } goto adjust_mode; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 998cfc211fa..40e2553cfc7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-02-18 Jakub Jelinek + + PR debug/47780 + * gcc.target/i386/pr47780.c: New test. + 2011-02-18 Janus Weil PR fortran/47767 diff --git a/gcc/testsuite/gcc.target/i386/pr47780.c b/gcc/testsuite/gcc.target/i386/pr47780.c new file mode 100644 index 00000000000..89fe4093dfc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr47780.c @@ -0,0 +1,14 @@ +/* PR debug/47780 */ +/* { dg-do compile } */ +/* { dg-options "-O -fgcse -fgcse-las -fstack-protector-all -fno-tree-ccp -fno-tree-dominator-opts -fcompare-debug -Wno-psabi" } */ + +typedef int V2SF __attribute__ ((vector_size (128))); + +V2SF +foo (int x, V2SF a) +{ + V2SF b = a + (V2SF) {}; + while (x--) + a += b; + return a; +}