diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/20090303-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20090303-1.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20090303-1.c b/gcc/testsuite/gcc.c-torture/compile/20090303-1.c new file mode 100644 index 000000000..18a3d91fd --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20090303-1.c @@ -0,0 +1,20 @@ +/* The array offset became 0x1ffffffffffffffe via a conversion from + signed to unsigned HOST_WIDE_INT, causing an ICE compiling for + Thumb. */ + +int r (unsigned short *); +void s (unsigned short *, unsigned short *); + +int +f (int x) +{ + unsigned short a[1], c[1]; + + if (r (a)) + return x; + + if (c[-1]) + s (a, c); + + return 0; +} |