From: Roman Zhuykov Date: Sat, 28 Mar 2020 21:06:54 +0000 (+0300) Subject: testsuite: adjust modulo-sched compare-debug tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=946a444df340609663975c998edc8dfa47284c38;p=gcc.git testsuite: adjust modulo-sched compare-debug tests Without this patch tortured tests eventually fail because of another known issue which I plan to fix later in stage1. * gcc.dg/torture/pr87197-debug-sms.c: Move to ... * gcc.dg/sms-compare-debug-1.c: ... this. Add -O2. * gcc.c-torture/execute/pr70127-debug-sms.c: Move to ... * gcc.dg/sms-compare-debug-2.c: ... this. Add -O2. --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 92f161f197a..5a1a2d12348 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2020-03-28 Roman Zhuykov + + * gcc.dg/torture/pr87197-debug-sms.c: Move to ... + * gcc.dg/sms-compare-debug-1.c: ... this. Add -O2. + * gcc.c-torture/execute/pr70127-debug-sms.c: Move to ... + * gcc.dg/sms-compare-debug-2.c: ... this. Add -O2. + 2020-03-28 Tobias Burnus PR fortran/94348 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr70127-debug-sms.c b/gcc/testsuite/gcc.c-torture/execute/pr70127-debug-sms.c deleted file mode 100644 index 46911789be8..00000000000 --- a/gcc/testsuite/gcc.c-torture/execute/pr70127-debug-sms.c +++ /dev/null @@ -1,23 +0,0 @@ -/* { dg-additional-options "-fcompare-debug -fmodulo-sched" } */ - -struct S { int f; signed int g : 2; } a[1], c = {5, 1}, d; -short b; - -__attribute__((noinline, noclone)) void -foo (int x) -{ - if (x != 1) - __builtin_abort (); -} - -int -main () -{ - while (b++ <= 0) - { - struct S e = {1, 1}; - d = e = a[0] = c; - } - foo (a[0].g); - return 0; -} diff --git a/gcc/testsuite/gcc.dg/sms-compare-debug-1.c b/gcc/testsuite/gcc.dg/sms-compare-debug-1.c new file mode 100644 index 00000000000..96b376c3922 --- /dev/null +++ b/gcc/testsuite/gcc.dg/sms-compare-debug-1.c @@ -0,0 +1,36 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fcompare-debug -fmodulo-sched --param sms-min-sc=1" } */ + +int a, c, e, f, g; +void +h (int i) +{ + a = i; +} +void +j (char *i, long k) +{ + while (k--) + c = *i++; +} +void +l (unsigned char *i, long k) +{ + unsigned char *b = i + k; + while (i < b) + { + h (*i); + i++; + } +} +void +m () +{ + while (e) + { + float d = g; + l ((char *) &d, sizeof (g)); + if (f) + j ((char *) &d, sizeof (g)); + } +} diff --git a/gcc/testsuite/gcc.dg/sms-compare-debug-2.c b/gcc/testsuite/gcc.dg/sms-compare-debug-2.c new file mode 100644 index 00000000000..dca7b65c08e --- /dev/null +++ b/gcc/testsuite/gcc.dg/sms-compare-debug-2.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fcompare-debug -fmodulo-sched" } */ + +struct S { int f; signed int g : 2; } a[1], c = {5, 1}, d; +short b; + +__attribute__((noinline, noclone)) void +foo (int x) +{ + if (x != 1) + __builtin_abort (); +} + +int +main () +{ + while (b++ <= 0) + { + struct S e = {1, 1}; + d = e = a[0] = c; + } + foo (a[0].g); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr87197-debug-sms.c b/gcc/testsuite/gcc.dg/torture/pr87197-debug-sms.c deleted file mode 100644 index fbbf1b389ea..00000000000 --- a/gcc/testsuite/gcc.dg/torture/pr87197-debug-sms.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do compile } */ -/* { dg-additional-options "-fcompare-debug -fmodulo-sched --param sms-min-sc=1" } */ - -int a, c, e, f, g; -void -h (int i) -{ - a = i; -} -void -j (char *i, long k) -{ - while (k--) - c = *i++; -} -void -l (unsigned char *i, long k) -{ - unsigned char *b = i + k; - while (i < b) - { - h (*i); - i++; - } -} -void -m () -{ - while (e) - { - float d = g; - l ((char *) &d, sizeof (g)); - if (f) - j ((char *) &d, sizeof (g)); - } -}