re PR debug/47780 (-fcompare-debug failure with -O -fgcse -fgcse-las -fstack-protector-all)

PR debug/47780
	* cfgexpand.c (expand_debug_expr) <case SSA_NAME>: Call copy_rtx to
	avoid invalid rtx sharing.

	* gcc.target/i386/pr47780.c: New test.

From-SVN: r170270
This commit is contained in:
Jakub Jelinek 2011-02-18 11:42:48 +01:00 committed by Jakub Jelinek
parent 6e2062b00f
commit abfea58d53
4 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2011-02-18 Jakub Jelinek <jakub@redhat.com>
PR debug/47780
* cfgexpand.c (expand_debug_expr) <case SSA_NAME>: Call copy_rtx to
avoid invalid rtx sharing.
2011-02-18 Gerald Pfeifer <gerald@pfeifer.com>
* doc/cpp.texi (Obsolete Features): Add background on the

View File

@ -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;
}

View File

@ -1,3 +1,8 @@
2011-02-18 Jakub Jelinek <jakub@redhat.com>
PR debug/47780
* gcc.target/i386/pr47780.c: New test.
2011-02-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/47767

View File

@ -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;
}