Message ID | 05e075ad-f6ff-4760-887c-a50abd557608@gjlay.de |
---|---|
State | New |
Headers | show |
Series | [testsuite] Fix gcc.c-torture/execute/ieee/pr108540-1.c | expand |
On Thu, Oct 3, 2024 at 1:30 PM Georg-Johann Lay <avr@gjlay.de> wrote: > > gcc.c-torture/execute/ieee/pr108540-1.c obviously requires that double > is a 64-bit type, hence add pr108540-1.x as an according filter. > > Ok for trunk? > > And is there a reason for why we are still putting test cases in > these old parts of the testsuite that don't support dg-magic-comments > like > > /* { dg-require-effective-target double64 } */ > > ? No, it's better to move the test - OK with that change. Thanks, Richard. > Johann > > -- > > testsuite - Fix gcc.c-torture/execute/ieee/pr108540-1.c > > PR testsuite/108540 > gcc/testsuite/ > * gcc.c-torture/execute/ieee/pr108540-1.c: Un-preprocess > __SIZE_TYPE__ and __INT64_TYPE__. > * gcc.c-torture/execute/ieee/pr108540-1.x: New file, requires double64.
testsuite - Fix gcc.c-torture/execute/ieee/pr108540-1.c PR testsuite/108540 gcc/testsuite/ * gcc.c-torture/execute/ieee/pr108540-1.c: Un-preprocess __SIZE_TYPE__ and __INT64_TYPE__. * gcc.c-torture/execute/ieee/pr108540-1.x: New file, requires double64. diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/pr108540-1.c b/gcc/testsuite/gcc.c-torture/execute/ieee/pr108540-1.c index ebd4c502ee5..db094418a79 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ieee/pr108540-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/pr108540-1.c @@ -1,7 +1,7 @@ /* PR tree-optimization/108540 */ __attribute__((noipa)) void -bar (const char *cp, unsigned long size, char sign, int dsgn) +bar (const char *cp, __SIZE_TYPE__ size, char sign, int dsgn) { if (__builtin_strcmp (cp, "ZERO") != 0 || size != 4 || sign != '-' || dsgn != 1) __builtin_abort (); @@ -11,7 +11,7 @@ __attribute__((noipa)) void foo (int x, int ch, double d) { const char *cp = ""; - unsigned long size = 0; + __SIZE_TYPE__ size = 0; char sign = '\0'; switch (x) { @@ -41,7 +41,7 @@ foo (int x, int ch, double d) sign = '\0'; if (ch == 'a' || ch == 'A') { - union U { long long l; double d; } u; + union U { __INT64_TYPE__ l; double d; } u; int dsgn; u.d = d; if (u.l < 0) diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/pr108540-1.x b/gcc/testsuite/gcc.c-torture/execute/ieee/pr108540-1.x new file mode 100644 index 00000000000..06d93efeb99 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/pr108540-1.x @@ -0,0 +1,7 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_double64] } { + return 1 +} + +return 0