see.c (see_pre_insert_extensions): Use copy_rtx to avoid invalid rtx sharing.
* see.c (see_pre_insert_extensions): Use copy_rtx to avoid invalid rtx sharing. * gcc.c-torture/compile/20080522-1.c: New testcase. From-SVN: r135770
This commit is contained in:
parent
5bf6d4abbb
commit
4799e6aa58
4 changed files with 30 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-05-22 Rafael Espindola <espindola@google.com>
|
||||
|
||||
* see.c (see_pre_insert_extensions): Use copy_rtx to avoid invalid rtx
|
||||
sharing.
|
||||
|
||||
2008-05-22 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* defaults.h (UNITS_PER_SIMD_WORD): Add scalar mode as argument.
|
||||
|
|
|
@ -1686,7 +1686,7 @@ see_pre_insert_extensions (struct see_pre_extension_expr **index_map)
|
|||
edge eg = INDEX_EDGE (edge_list, e);
|
||||
|
||||
start_sequence ();
|
||||
emit_insn (PATTERN (expr->se_insn));
|
||||
emit_insn (copy_insn (PATTERN (expr->se_insn)));
|
||||
se_insn = get_insns ();
|
||||
end_sequence ();
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2008-05-22 Rafael Espindola <espindola@google.com>
|
||||
|
||||
* gcc.c-torture/compile/20080522-1.c: New testcase.
|
||||
|
||||
2008-05-22 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* gcc.c-torture/execute/20080522-1.c: New testcase.
|
||||
|
|
20
gcc/testsuite/gcc.c-torture/compile/20080522-1.c
Normal file
20
gcc/testsuite/gcc.c-torture/compile/20080522-1.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* { dg-do compile }
|
||||
/* { dg-options "-O2 -fsee" } */
|
||||
|
||||
int f(const char* ptr, int bar) {
|
||||
return (((const char *)0 - ptr ) & (bar - 1)) == 0;
|
||||
}
|
||||
|
||||
|
||||
int g(const char* ptr, const char *test, int N, int bar) {
|
||||
if (N == 0) {
|
||||
}
|
||||
else if (N > 0) {
|
||||
int count = 0;
|
||||
while ( count < N) {
|
||||
if (!f(ptr, bar))
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return f(test, bar) ;
|
||||
}
|
Loading…
Add table
Reference in a new issue