]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64/testsuite: fix auto-init-padding-[24].c testcases [PR122402]
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Fri, 24 Oct 2025 20:43:24 +0000 (13:43 -0700)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Fri, 24 Oct 2025 20:50:33 +0000 (13:50 -0700)
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 <andrew.pinski@oss.qualcomm.com>
gcc/testsuite/gcc.target/aarch64/auto-init-padding-2.c
gcc/testsuite/gcc.target/aarch64/auto-init-padding-4.c

index d3b6591c9b09be29a62a12194db2760b37dbb50e..25d06d7c5a4cbffb5bd8403ae9af24cfaf3c71ff 100644 (file)
@@ -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;
index efd310f054d1fd9d93237c9895d42c5fbb15b85b..fa9def7bf8acaccf036c33574a851e356faeb833 100644 (file)
@@ -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;