diff options
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/20140828-1.c')
-rw-r--r-- | SingleSource/Regression/C/gcc-c-torture/execute/20140828-1.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/20140828-1.c b/SingleSource/Regression/C/gcc-c-torture/execute/20140828-1.c new file mode 100644 index 00000000..5eeb8e01 --- /dev/null +++ b/SingleSource/Regression/C/gcc-c-torture/execute/20140828-1.c @@ -0,0 +1,22 @@ +short *f(short *a, int b, int *d) __attribute__((noinline,noclone)); + +short *f(short *a, int b, int *d) +{ + short c = *a; + a++; + c = b << c; + *d = c; + return a; +} + +int main(void) +{ + int d; + short a[2]; + a[0] = 0; + if (f(a, 1, &d) != &a[1]) + __builtin_abort (); + if (d != 1) + __builtin_abort (); + return 0; +} |