diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f606965c88d..715006359b2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-09-16 Jeff Law + + * gcc.c-torture/execute/pr58419.c: New test. + * gcc.c-torture/execute/pr58431.c: New test. + 2013-09-16 Tobias Burnus PR fortran/58356 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58419.c b/gcc/testsuite/gcc.c-torture/execute/pr58419.c new file mode 100644 index 00000000000..527fcb7a05a --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr58419.c @@ -0,0 +1,35 @@ +int printf(const char *, ...); + +int a, g, i, k, *p; +char b, e; +short c, h; +static short *d = &c; + +char +foo (int p1, int p2) +{ + return p1 - p2; +} + +int +bar () +{ + short *q = &c; + *q = 1; + *p = 0; + return 0; +} + +int +main () +{ + for (b = -22; b >= -29; b--) + { + short *l = &h; + char *m = &e; + *l = a; + g = foo (*m = k && *d, 1 > i) || bar (); + } + getpid(); + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58431.c b/gcc/testsuite/gcc.c-torture/execute/pr58431.c new file mode 100644 index 00000000000..1a992c5fc8d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr58431.c @@ -0,0 +1,33 @@ +char a, h; +int b, d, e, g, j, k; +volatile int c; +short i; + +int +main () +{ + int m; + + m = i ^= 1; + for (b = 0; b < 1; b++) + { + char o = m; + g = k; + j = j || c; + if (a != o) + for (; d < 1; d++) + ; + else + { + char *p = &h; + *p = 1; + for (; e; e++) + ; + } + } + + if (h != 0) + __builtin_abort(); + + return 0; +}