From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AFC153858D3C; Sat, 23 Dec 2023 07:46:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AFC153858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703317577; bh=C2hsDY9dXfBkBUpjLJVKtYjhDyURdYYEEwAYuq9GtkE=; h=From:To:Subject:Date:From; b=pdv759+og0m/IAAqRqILs1fS+Akm1nJ1GHO9za6K9zOevgLGbKEOzhko2Ik9cj+ze m/XfMlXP7PrwGLMmGKhZTVB0yCcDYRGhCN6dEKwTkutO8zvccX7QC0RRU9NoJV2Tqq IA1qdcp2+Q6638aQBOIH/y8QUkDdDiqFVrUn/JrA= From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113120] New: during GIMPLE pass: bitintlower ICE: SIGSEGV with _BitInt() at -O2 Date: Sat, 23 Dec 2023 07:46:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zsojka at seznam dot cz X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget attachments.created Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113120 Bug ID: 113120 Summary: during GIMPLE pass: bitintlower ICE: SIGSEGV with _BitInt() at -O2 Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 56926 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56926&action=3Dedit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -O2 testcase.c -wrapper valgrind,-q =3D=3D23272=3D=3D Invalid read of size 2 =3D=3D23272=3D=3D at 0x2635303: contains_struct_check (tree.h:3757) =3D=3D23272=3D=3D by 0x2635303: gimple_lower_bitint() (gimple-lower-biti= nt.cc:6585) =3D=3D23272=3D=3D by 0x13C87DA: execute_one_pass(opt_pass*) (passes.cc:2= 646) =3D=3D23272=3D=3D by 0x13C90CF: execute_pass_list_1(opt_pass*) (passes.c= c:2755) =3D=3D23272=3D=3D by 0x13C90E1: execute_pass_list_1(opt_pass*) (passes.c= c:2756) =3D=3D23272=3D=3D by 0x13C9108: execute_pass_list(function*, opt_pass*) (passes.cc:2766) =3D=3D23272=3D=3D by 0xFC9795: expand (cgraphunit.cc:1842) =3D=3D23272=3D=3D by 0xFC9795: cgraph_node::expand() (cgraphunit.cc:1795) =3D=3D23272=3D=3D by 0xFCAADA: expand_all_functions (cgraphunit.cc:2025) =3D=3D23272=3D=3D by 0xFCAADA: symbol_table::compile() [clone .part.0] (cgraphunit.cc:2399) =3D=3D23272=3D=3D by 0xFCD657: compile (cgraphunit.cc:2312) =3D=3D23272=3D=3D by 0xFCD657: symbol_table::finalize_compilation_unit() (cgraphunit.cc:2584) =3D=3D23272=3D=3D by 0x150A701: compile_file() (toplev.cc:473) =3D=3D23272=3D=3D by 0xDE58FB: do_compile (toplev.cc:2150) =3D=3D23272=3D=3D by 0xDE58FB: toplev::main(int, char**) (toplev.cc:2306) =3D=3D23272=3D=3D by 0xDE70DA: main (main.cc:39) =3D=3D23272=3D=3D Address 0x0 is not stack'd, malloc'd or (recently) free'd =3D=3D23272=3D=3D=20 during GIMPLE pass: bitintlower testcase.c: In function 'bar': testcase.c:5:1: internal compiler error: Segmentation fault 5 | bar(unsigned _BitInt(1) c, _BitInt(401) d) | ^~~ 0x150a21f crash_signal /repo/gcc-trunk/gcc/toplev.cc:316 0x2635303 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) /repo/gcc-trunk/gcc/tree.h:3757 0x2635303 gimple_lower_bitint /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:6585 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=3D/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-g= cc COLLECT_LTO_WRAPPER=3D/repo/gcc-trunk/binary-trunk-r14-6806-20231222122934-= gcefae511ed7-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc= /x86_64-pc-linux-gnu/14.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=3Dc,c++ --enable-valgrind-annotations --disable-nls --enable-checking=3Dyes,rtl,df,= extra --disable-bootstrap --with-cloog --with-ppl --with-isl --build=3Dx86_64-pc-linux-gnu --host=3Dx86_64-pc-linux-gnu --target=3Dx86_64-pc-linux-gnu --with-ld=3D/usr/bin/x86_64-pc-linux-gnu-ld --with-as=3D/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=3D/repo/gcc-trunk//binary-trunk-r14-6806-20231222122934-gcefae511e= d7-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20231222 (experimental) (GCC)=