On Thu, Jan 15, 2026 at 12:02:49PM -0800, Pengxuan Zheng wrote:
> This fixes failures on i686 and arm.
> 
> Pushed to trunk as obvious.

That is not obvious, it is actually wrong.
x86_64-*-* can mean both 64-bit and 32-bit (e.g. when testing with
--target_board=unix\{-m32,-m64\} or even
--target_board=unix\{-m32,-m32/-mno-sse,-m64\}
).  Furthermore, some x86_64-*-* targets like Solaris default to -m32.

In effective targets when using target triplets, you always want to use
both x86_64-*-* i?86-*-* next to each other.  Now, either you also add
/* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */
or need to use something like
{ { { x86_64-*-* i?86-*-* } && lp64 } || aarch64-*-* } 
as effective target (or { ! ia32 } instead of lp64).
But I think the dg-additional-options is better.

Anyway, as I wrote in my earlier mail, this means that for scalars
it will also be tested just on the two arches, perhaps that is
undesirable and splitting the test is still worthwhile.

Or as Jeff said, scan earlier dump instead of optimized and add -Wno-psabi
and test on all targets.

> gcc/testsuite/ChangeLog:
> 
>       * gcc.dg/pr123109.c: Require target x86_64 and aarch64.
> 
> Signed-off-by: Pengxuan Zheng <[email protected]>
> ---
>  gcc/testsuite/gcc.dg/pr123109.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/testsuite/gcc.dg/pr123109.c b/gcc/testsuite/gcc.dg/pr123109.c
> index 9b83d578713..0d51863ca40 100644
> --- a/gcc/testsuite/gcc.dg/pr123109.c
> +++ b/gcc/testsuite/gcc.dg/pr123109.c
> @@ -1,4 +1,4 @@
> -/* { dg-do compile } */
> +/* { dg-do compile { target { x86_64-*-* aarch64-*-* } } } */
>  /* { dg-options "-O2 -fdump-tree-optimized" } */
>  
>  typedef int v4si __attribute__((vector_size(4 * sizeof(int))));

        Jakub

Reply via email to