https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121028

            Bug ID: 121028
           Summary: Some tests added in r15-5785-gdfa78681851 fail with
                    -fstack-protector-strong
           Product: gcc
           Version: 15.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: siddhesh at gcc dot gnu.org
  Target Milestone: ---

The following tests fail when they're built with -fstack-protector-strong:

gcc.target/aarch64/sve/acle/asm/ld2_mf8.c       
gcc.target/aarch64/sve/acle/asm/ld3_mf8.c       
gcc.target/aarch64/sve/acle/asm/ld4_mf8.c
gcc.target/aarch64/sve/acle/asm/reinterpret_mf8.c

because they generate `smstop sm`, which the assembler does not expect:

/tmp/ccAM1BXW.s: Assembler messages:                                          
/tmp/ccAM1BXW.s:116: Error: selected processor does not support `smstop sm'   
/tmp/ccAM1BXW.s:287: Error: selected processor does not support `smstop sm'   
/tmp/ccAM1BXW.s:453: Error: selected processor does not support `smstop sm'   
/tmp/ccAM1BXW.s:620: Error: selected processor does not support `smstop sm'   
/tmp/ccAM1BXW.s:791: Error: selected processor does not support `smstop sm'   
/tmp/ccAM1BXW.s:958: Error: selected processor does not support `smstop sm'   
/tmp/ccAM1BXW.s:1125: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:1293: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:1461: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:1632: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:1796: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:1962: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:2128: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:2294: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:2460: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:2626: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:2792: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:2958: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:3124: Error: selected processor does not support `smstop sm'  
/tmp/ccAM1BXW.s:3297: Error: selected processor does not support `smstop sm'  

They're built with -march=armv8.2-a+sve and they work just fine when built
without stack-protector.  However when built with -fstack-protector-strong, the
functions end up with a `smstop sm` just before the __stack_chk_fail call. 
This seems wrong since the assembler only expects `smstop` with
-march=armv8.2-a+sve2+sme.

To reproduce:

gcc/xgcc -Bgcc -fstack-protector-strong -std=c90 -O0 -DSTREAMING_COMPATIBLE
-DTEST_FULL -march=armv8.2-a+sve -c -o ld2_mf8.s
../gcc/testsuite/gcc.target/aarch64/sve/acle/asm/ld2_mf8.c

Reply via email to