diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-08-18 16:13:48 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-08-18 16:13:48 +0200 |
commit | 4dee97188f81ded9083171093ec08484f0ddd594 (patch) | |
tree | 2dee4b68013228a0d627c8406e6c90dba807856f /gcc/testsuite/gcc.dg/pr50017.c | |
parent | 51fdcb386bf919fcc212bd9864853d18afdae163 (diff) | |
download | gcc-4dee97188f81ded9083171093ec08484f0ddd594.tar.gz |
re PR debug/50017 (-fcompare-debug failure)
PR debug/50017
* tree-vect-stmts.c (vect_finish_stmt_generation): If gsi_stmt (*gsi)
is a debug stmt, use location of the first non-debug stmt after it.
* gcc.dg/pr50017.c: New test.
From-SVN: r177857
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr50017.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr50017.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr50017.c b/gcc/testsuite/gcc.dg/pr50017.c new file mode 100644 index 00000000000..66bef007da1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr50017.c @@ -0,0 +1,20 @@ +/* PR debug/50017 */ +/* { dg-do compile } */ +/* { dg-options "-O3 -fcompare-debug" } */ + +struct S { int r, i; }; + +void +foo (struct S *x, int y) +{ + int i; + for (i = 1; i < y; i++) + { + struct S a, b, c; + a = x[0]; + b = x[i]; + c.r = a.r * b.r - a.i * b.i; + c.i = a.r * b.i + a.i * b.r; + x[i] = c; + } +} |