diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/103818.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20050113-1.c | 16 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr103376.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr105234.c | 14 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr105247.c | 10 |
5 files changed, 45 insertions, 16 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/103818.c b/gcc/testsuite/gcc.c-torture/compile/103818.c new file mode 100644 index 00000000000..e6cbe7860cf --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/103818.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target lp64 } } */ +struct A { int b[1]; }; + +void +foo (struct A *d) +{ + d->b[0] = d->b[-144115188075855873LL] + d->b[11] * d->b[2] + + d->b[0] % d->b[1025] + d->b[5]; + d->b[0] = d->b[144678138029277184LL] + d->b[0] & d->b[-3] * d->b[053] + + d->b[7] ^ d->b[-9] + d->b[14] + d->b[9] % d->b[49] + + d->b[024] + d->b[82] & d->b[4096]; +} diff --git a/gcc/testsuite/gcc.c-torture/compile/20050113-1.c b/gcc/testsuite/gcc.c-torture/compile/20050113-1.c deleted file mode 100644 index 6e36ed6fd7c..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/20050113-1.c +++ /dev/null @@ -1,16 +0,0 @@ -/* PR c/17297 */ - -typedef float V2SF __attribute__ ((vector_size (8))); - -int test0 (V2SF, V2SF); - -int -main (void) -{ - V2SF a = (V2SF) {1.0f/0.0f - 1.0f/0.0f, 1.0f/0.0f - 1.0f/0.0f}; - V2SF b = (V2SF) {567.345, 1984.0}; - int i; - - i = test0 (a, b); - return i; -} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr103376.c b/gcc/testsuite/gcc.c-torture/compile/pr103376.c new file mode 100644 index 00000000000..8c14c3ded38 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr103376.c @@ -0,0 +1,9 @@ +/* { dg-additional-options "-Ofast" } */ +__attribute__ ((optimize ("no-associative-math"))) double +fn3 (double h, double l) +{ + return h + l; +} + +double fn3 (double, double) __attribute__ ((optimize ("O2,no-associative-math"))); + diff --git a/gcc/testsuite/gcc.c-torture/compile/pr105234.c b/gcc/testsuite/gcc.c-torture/compile/pr105234.c new file mode 100644 index 00000000000..3fdfed8b562 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr105234.c @@ -0,0 +1,14 @@ +/* PR target/105234 */ +/* { dg-do compile } */ + +static inline __attribute__((always_inline)) int foo (int x) { return x + 1; } +#pragma GCC push_options +static inline __attribute__((always_inline)) int bar (int x) { return x + 2; } +#pragma GCC pop_options +static inline __attribute__((always_inline)) int baz (int x) { return x + 3; } + +int +qux (void) +{ + return foo (bar (baz (42))); +} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr105247.c b/gcc/testsuite/gcc.c-torture/compile/pr105247.c new file mode 100644 index 00000000000..88892d98453 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr105247.c @@ -0,0 +1,10 @@ +/* PR target/105247 */ + +int a; + +void +foo (void) +{ + int y = -8; + a = 1 << y; +} |