public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6732] testsuite: Fix up forwprop-39.c testcase [PR109145]
@ 2023-03-17  8:58 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2023-03-17  8:58 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2bb71424636fba7944b36b1689e9df22a53f1a3f

commit r13-6732-g2bb71424636fba7944b36b1689e9df22a53f1a3f
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Mar 17 09:58:08 2023 +0100

    testsuite: Fix up forwprop-39.c testcase [PR109145]
    
    As written in the PR, newlib headers aren't C11 compliant in that they
    don't define CMPLXF macro, and glibc before 2.16 doesn't define that
    either.  I think it is easier to use __builtin_complex directly, over
    another patch which keeps including complex.h but defines CMPLXF if it
    isn't defined, we want to test how forwprop behaves rather than what
    complex.h defines or doesn't define.
    
    2023-03-17  Jakub Jelinek  <jakub@redhat.com>
    
            PR testsuite/109145
            * gcc.dg/tree-ssa/forwprop-39.c: Remove -std=c11 from dg-options.
            Don't include complex.h.
            (foo): Use __builtin_complex rather than CMPLXF.

Diff:
---
 gcc/testsuite/gcc.dg/tree-ssa/forwprop-39.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-39.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-39.c
index eb2930e77fd..232f409452c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-39.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-39.c
@@ -1,14 +1,12 @@
 /* { dg-do compile } */
-/* { dg-options "-std=c11 -O2 -fdump-tree-forwprop1 -fdump-tree-optimized" } */
-
-#include <complex.h>
+/* { dg-options "-O2 -fdump-tree-forwprop1 -fdump-tree-optimized" } */
 
 extern void push1(void *p, float _Complex x);
 void foo (void *q, float _Complex *x)
 {
   float r = __real *x;
   float i = __imag *x;
-  push1 (q, CMPLXF (r, i));
+  push1 (q, __builtin_complex (r, i));
 }
 
 /* { dg-final { scan-tree-dump-not "COMPLEX_EXPR" "forwprop1" } } */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-17  8:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17  8:58 [gcc r13-6732] testsuite: Fix up forwprop-39.c testcase [PR109145] Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).