https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103557
Bug ID: 103557 Summary: [12 regression] ICE on tpm2-tss-3.0.3: during RTL pass: sched2: SIGSEGV in memory_operand() Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Noticed as an ICE in tpm2-tss-3.0.3 against weekly gcc-12 snapshot. Here is th extracted example: $ cat a.c.c // gcc-12.0.0 -O2 -c a.c.c -o a.o struct { char sm3_256[32]; } TPMU_HA; typedef struct { short size; char buffer[sizeof(TPMU_HA)]; } TPM2B_DIGEST; typedef struct { TPM2B_DIGEST auths[3]; } TSS2L_SYS_AUTH_COMMAND; void Tss2_Sys_Clear(TSS2L_SYS_AUTH_COMMAND); void sysContext(void) { TPM2B_DIGEST nonce = {}; TSS2L_SYS_AUTH_COMMAND sessionsDataIn = {{nonce}}; Tss2_Sys_Clear(sessionsDataIn); } $ gcc-12.0.0 -O2 -c a.c.c -o a.o during RTL pass: sched2 a.c.c: In function 'sysContext': a.c.c:19:1: internal compiler error: Segmentation fault 19 | } | ^ 0x1e22687 internal_error(char const*, ...) ???:0 0xe7e43c memory_operand(rtx_def*, machine_mode) ???:0 0x167e598 get_attr_memory(rtx_insn*) ???:0 0x19a4bc0 insn_default_latency_generic(rtx_insn*) ???:0 0x1c74ad3 insn_sched_cost(rtx_insn*) ???:0 0x1c77934 dep_cost_1(_dep*, unsigned int) ???:0 0x1c79d7f set_priorities(rtx_insn*, rtx_insn*) ???:0 0xec28e2 compute_priorities() ???:0 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. $ gcc-12.0.0 -v Using built-in specs. COLLECT_GCC=/nix/store/gqvmd777r63c5nvbrfwcgdlam0krmv4l-gcc-12.0.0/bin/gcc COLLECT_LTO_WRAPPER=/nix/store/gqvmd777r63c5nvbrfwcgdlam0krmv4l-gcc-12.0.0/libexec/gcc/x86_64-unknown-linux-gnu/12.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20211128 (experimental) (GCC)