diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-28 17:01:05 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-28 17:01:05 +0000 |
commit | 2241e3a7d3449adac706d7a186ea72dc44bffd21 (patch) | |
tree | 6e2e2c933c124f3e6df48df8ceee73af9f76ee8b /gcc/testsuite/gcc.dg/pr45105.c | |
parent | bb78b9eefd523013e1a29bbf5de4afac6390f8d4 (diff) | |
download | gcc-2241e3a7d3449adac706d7a186ea72dc44bffd21.tar.gz |
PR debug/45105
* gcse.c (hoist_code): Use FOR_BB_INSNS macro.
* gcc.dg/pr45105.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162647 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr45105.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr45105.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr45105.c b/gcc/testsuite/gcc.dg/pr45105.c new file mode 100644 index 00000000000..a93a21f9ee5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr45105.c @@ -0,0 +1,27 @@ +/* PR debug/45105 */ +/* { dg-do compile } */ +/* { dg-options "-Os -fcompare-debug" } */ + +extern int *baz (int *, int *); + +void +bar (int *p1, int *p2) +{ + int n = *baz (0, 0); + p1[n] = p2[n]; +} + +void +foo (int *p, int l) +{ + int a1[32]; + int a2[32]; + baz (a1, a2); + while (l) + { + if (l & 1) + p = baz (a2, p); + l--; + bar (a1, a2); + } +} |