From: Andrew Pinski Date: Fri, 24 Oct 2025 20:43:24 +0000 (-0700) Subject: aarch64/testsuite: fix auto-init-padding-[24].c testcases [PR122402] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33f8e30e0af142eef40e1fd28fa92a23ecac5b47;p=thirdparty%2Fgcc.git aarch64/testsuite: fix auto-init-padding-[24].c testcases [PR122402] After r16-3956-gf613fdc6920c83, these 2 testcases start to fail as now SRA will fully scalarize the structs and only provide with the piece that was used. But the testcase is testing about the padding so turning off SRA is correct in this case. Pushed as obvious after testing the testcases now pass. PR target/122402 gcc/testsuite/ChangeLog: * gcc.target/aarch64/auto-init-padding-2.c: Turn off SRA. * gcc.target/aarch64/auto-init-padding-4.c: Likewise. Signed-off-by: Andrew Pinski --- diff --git a/gcc/testsuite/gcc.target/aarch64/auto-init-padding-2.c b/gcc/testsuite/gcc.target/aarch64/auto-init-padding-2.c index d3b6591c9b0..25d06d7c5a4 100644 --- a/gcc/testsuite/gcc.target/aarch64/auto-init-padding-2.c +++ b/gcc/testsuite/gcc.target/aarch64/auto-init-padding-2.c @@ -1,7 +1,8 @@ /* Verify pattern initialization for structure type automatic variables with padding. */ /* { dg-do compile } */ -/* { dg-options "-O -ftrivial-auto-var-init=pattern" } */ +/* SRA should be turned off as it can fully scalarize var as the padding is not touched. */ +/* { dg-options "-O -ftrivial-auto-var-init=pattern -fno-tree-sra" } */ struct test_aligned { int internal1; diff --git a/gcc/testsuite/gcc.target/aarch64/auto-init-padding-4.c b/gcc/testsuite/gcc.target/aarch64/auto-init-padding-4.c index efd310f054d..fa9def7bf8a 100644 --- a/gcc/testsuite/gcc.target/aarch64/auto-init-padding-4.c +++ b/gcc/testsuite/gcc.target/aarch64/auto-init-padding-4.c @@ -1,7 +1,8 @@ /* Verify pattern initialization for nested structure type automatic variables with padding. */ /* { dg-do compile } */ -/* { dg-options "-O -ftrivial-auto-var-init=pattern" } */ +/* SRA should be turned off as it can fully scalarize var as the padding is not touched. */ +/* { dg-options "-O -ftrivial-auto-var-init=pattern -fno-tree-sra" } */ struct test_aligned { unsigned internal1;