From 5ddcf049376fe77e4895b857b22b3c142930b86b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 21 Jan 2025 16:53:14 +0100 Subject: [PATCH] testsuite: Add testcase for already fixed PR [PR118560] The fix for this PR has been committed without a testcase. The following testcase would take at least 15 minutes to compile on a fast machine (powerpc64-linux both -m32 or -m64), now it takes 100ms. 2025-01-21 Jakub Jelinek PR target/118560 * gcc.dg/dfp/pr118560.c: New test. --- gcc/testsuite/gcc.dg/dfp/pr118560.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/dfp/pr118560.c diff --git a/gcc/testsuite/gcc.dg/dfp/pr118560.c b/gcc/testsuite/gcc.dg/dfp/pr118560.c new file mode 100644 index 00000000000..2409a1a98f0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/dfp/pr118560.c @@ -0,0 +1,17 @@ +/* PR target/118560 */ +/* { dg-do compile } */ +/* { dg-options "-O1" } */ + +struct { _Decimal32 a; } b; +void foo (int, _Decimal32); + +#define B(n) \ +void \ +bar##n (int, _Decimal32 d) \ +{ \ + foo (n, 1); \ + b.a = d; \ +} + +#define C(n) B(n##0) B(n##1) B(n##2) B(n##3) B(n##4) B(n##5) B(n##6) B(n##7) B(n##8) B(n##9) +C(1) C(2) C(3) C(4) C(5) -- 2.47.3