From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 34507383B410; Tue, 11 May 2021 07:02:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34507383B410 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/100508] ICE with '-g -O3': in expand_debug_locations, at cfgexpand.c:5618 Date: Tue, 11 May 2021 07:02:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords cf_gcctarget everconfirmed cf_reconfirmed_on bug_status version cc component Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2021 07:02:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100508 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code, openmp Target| |x86_64-*-* Ever confirmed|0 |1 Last reconfirmed| |2021-05-11 Status|UNCONFIRMED |NEW Version|tree-ssa |12.0 CC| |jakub at gcc dot gnu.org Component|c |middle-end --- Comment #1 from Richard Biener --- #1 0x0000000000bb481f in expand_debug_locations () at ../../src/gcc-11-branch/gcc/cfgexpand.c:5615 5615 gcc_assert (mode =3D=3D GET_MODE (val) (gdb) l 5610 val =3D gen_rtx_UNKNOWN_VAR_LOC (); 5611 else 5612 { 5613 mode =3D GET_MODE (INSN_VAR_LOCATION (insn)); 5614 5615 gcc_assert (mode =3D=3D GET_MODE (val) 5616 || (GET_MODE (val) =3D=3D VOIDmode 5617 && (CONST_SCALAR_INT_P (val) 5618 || GET_CODE (val) =3D=3D CONST_FIXED 5619 || GET_CODE (val) =3D=3D LABEL_REF)= )); (gdb) p debug_rtx (insn) (debug_insn 10 9 11 3 (var_location:V8SI m (pc Program received signal SIGSEGV, Segmentation fault. 0x00007ffff68038f6 in __strlen_sse2 () from /lib64/libc.so.6 The program being debugged was signaled while in a function called from GDB. GDB has restored the context to what it was before the call. To change this behavior use "set unwindonsignal off". Evaluation of the expression containing the function (debug_rtx(rtx_def const*)) will be abandoned. (gdb) p debug_rtx (val) (debug_expr:BLK D#1) (gdb) p mode $3 =3D E_V8SImode possibly some TYPE/DECL_MODE[_RAW] issue. we have (gdb) p debug_tree (value) unit-size align:32 warn_if_not_align:0 symtab:-160677248 alias-set 1 canonical-type 0x7ffff65835e8 precision:32 min max pointer_to_this > sizes-gimplified asm_written V8SI size unit-size align:256 warn_if_not_align:0 symtab:-160677488 alias-set -1 canonical-type 0x7ffff668f738 nunits:8 context pointer_to_this > visited BLK t.c:3:1 align:1 warn_if_not_align:0 (debug_expr:BLK D#1)> so expand_debug_expr yields E_V8SImode from TYPE_MODE (TREE_TYPE (exp)) for unknown reasons - targetm.vector_mode_supported_p returns true. For some reason the debug stmt # DEBUG m =3D> m_2 appears already in into-SSA and at that point SIMD lowering didn't take effect yet? Do we have to adjust debug temps as well there?=