Bug 1667088

Summary: gcc.target/aarch64/sve/struct_move_1.c ICE with -fstack-protector-strong
Product: Red Hat Enterprise Linux 8 Reporter: Michael Petlan <mpetlan>
Component: gccAssignee: Marek Polacek <mpolacek>
gcc sub component: system-version QA Contact: Alexandra Petlanová Hájková <ahajkova>
Status: CLOSED WONTFIX Docs Contact:
Severity: unspecified    
Priority: unspecified CC: ahajkova, codonell, fweimer, jakub, law, mpetlan, ohudlick, sipoyare, tgummels, vmukhame, woodard
Version: 8.0Keywords: Triaged
Target Milestone: rc   
Target Release: 8.0   
Hardware: aarch64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-05 17:26:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1682592    
Bug Blocks: 1683831, 1684559, 1746605    

Description Michael Petlan 2019-01-17 12:21:30 UTC
Description of problem:

"Downstream" version of an upstream bug https://gcc.gnu.org/PR88847 ...
Testcase struct_move_1.c from aarch64 SVE tests causes an ICE when built with -fstack-protector-strong

============ From upstream PR ================
Target: aarch64-unknown-linux-gnu

$ ./cc1 -quiet struct_move_1.c -march=armv8.2-a+sve -msve-vector-bits=256 -mbig-endian -fstack-protector-strong
struct_move_1.c: In function ‘f2_vnx32qi’:
struct_move_1.c:60:1: error: unrecognizable insn:
   60 | TEST_TYPE (vnx32qi, z0, z2)
      | ^~~~~~~~~
(insn 12 11 13 2 (set (mem/c:VNx32QI (plus:DI (reg/f:DI 85 virtual-stack-vars)
                (const_int -80 [0xffffffffffffffb0])) [3 x+0 S64 A128])
        (unspec:VNx32QI [
                (reg:VNx16BI 93)
                (reg:VNx32QI 94)
            ] UNSPEC_MERGE_PTRUE)) "struct_move_1.c":60:1 -1
     (nil))
during RTL pass: vregs
struct_move_1.c:60:1: internal compiler error: in extract_insn, at recog.c:2305
0x59c1ab _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/polacek/src/gcc/gcc/rtl-error.c:108
0x59c1e3 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	/home/polacek/src/gcc/gcc/rtl-error.c:116
0xb8dfaf extract_insn(rtx_insn*)
	/home/polacek/src/gcc/gcc/recog.c:2305
0x90ea87 instantiate_virtual_regs_in_insn
	/home/polacek/src/gcc/gcc/function.c:1605
0x90ea87 instantiate_virtual_regs
	/home/polacek/src/gcc/gcc/function.c:1975
0x90ea87 execute
	/home/polacek/src/gcc/gcc/function.c:2024
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Without -fstack-protector-strong it compiles fine.
==============================================

Version-Release number of selected component (if applicable):
gcc-8.2.1-3.5.el8.aarch64

How reproducible:
100%

Steps to Reproduce:
as above

Actual results:
ICE

Expected results:
no ICE

Additional info:

Comment 1 Marek Polacek 2019-01-17 13:31:29 UTC
Moving to 8.1.

Comment 2 Marek Polacek 2019-02-13 15:07:20 UTC
Fixed now on trunk by gcc.gnu.org/r268845.  Unsure if we'll want to backport to 8.