https://gcc.gnu.org/g:61d356b4f0c6c5301c776ee2601eb19a84d2bec6

commit r16-7519-g61d356b4f0c6c5301c776ee2601eb19a84d2bec6
Author: Andrew Pinski <[email protected]>
Date:   Sat Feb 14 22:29:18 2026 -0800

    testsuite: Fix pr124086-1.c for ia32 (and maybe others)
    
    On some targets (ia32 for an example), sizeof long double
    is not a power of 2, this means you can't create a vector
    of it. So let's disable this testcase for non power of 2
    sizeof long double. This needs to be done via a preprocessor
    macro as vector_size would cause an error otherwise.
    
    Committed as obvious after a test on x86_64 with -m32.
    
    gcc/testsuite/ChangeLog:
    
            * c-c++-common/torture/pr124086-1.c: Only enable
            for power of 2 long double.

Diff:
---
 gcc/testsuite/c-c++-common/torture/pr124086-1.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/testsuite/c-c++-common/torture/pr124086-1.c 
b/gcc/testsuite/c-c++-common/torture/pr124086-1.c
index 6bca0431e4c8..b52d8e03f467 100644
--- a/gcc/testsuite/c-c++-common/torture/pr124086-1.c
+++ b/gcc/testsuite/c-c++-common/torture/pr124086-1.c
@@ -2,6 +2,8 @@
 /* { dg-options "" } */
 /* PR tree-optimization/124086 */
 
+/* Disable for non power of 2 long double as a vector of that is not 
supported. */
+#if (__SIZEOF_LONG_DOUBLE__ & -__SIZEOF_LONG_DOUBLE__) == 
__SIZEOF_LONG_DOUBLE__
 
 typedef __attribute__((__vector_size__(2*sizeof(long double)))) int V;
 int j;
@@ -13,3 +15,5 @@ foo()
   _Complex long double t =  *(_Complex long double *)&v;
   j = __real__ t;
 }
+
+#endif

Reply via email to