diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-11 11:13:27 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-11 11:13:27 +0000 |
commit | c41143fb1d63596ff2a0f6da741b4bae73b8be16 (patch) | |
tree | d70c0763693cfef7bc877f21e079986944261a5f /gcc/testsuite/gcc.dg/guality/pr45882.c | |
parent | eb0badc13724022c8828a55e516d0eecdc487cc3 (diff) | |
download | gcc-c41143fb1d63596ff2a0f6da741b4bae73b8be16.tar.gz |
2011-05-11 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 173647 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@173652 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/guality/pr45882.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/guality/pr45882.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/guality/pr45882.c b/gcc/testsuite/gcc.dg/guality/pr45882.c new file mode 100644 index 00000000000..5ca22d4f4ad --- /dev/null +++ b/gcc/testsuite/gcc.dg/guality/pr45882.c @@ -0,0 +1,30 @@ +/* PR debug/45882 */ +/* { dg-do run } */ +/* { dg-options "-g" } */ + +extern void abort (void); +int a[1024]; +volatile short int v; + +__attribute__((noinline,noclone,used)) int +foo (int i, int j) +{ + int b = i; /* { dg-final { gdb-test 16 "b" "7" } } */ + int c = i + 4; /* { dg-final { gdb-test 16 "c" "11" } } */ + int d = a[i]; /* { dg-final { gdb-test 16 "d" "112" } } */ + int e = a[i + 6]; /* { dg-final { gdb-test 16 "e" "142" } } */ + ++v; + return ++j; +} + +int +main (void) +{ + int l; + asm ("" : "=r" (l) : "0" (7)); + a[7] = 112; + a[7 + 6] = 142; + if (foo (l, 7) != 8) + abort (); + return l - 7; +} |