From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EAB67385803B; Wed, 24 Nov 2021 09:47:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EAB67385803B From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/103404] New: ICE: SIGSEGV in insert_with_costs (cse.c:1569) with custom flags Date: Wed, 24 Nov 2021 09:47:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 12.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 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 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: Wed, 24 Nov 2021 09:47:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103404 Bug ID: 103404 Summary: ICE: SIGSEGV in insert_with_costs (cse.c:1569) with custom flags Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Created attachment 51865 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D51865&action=3Dedit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -Og -fcse-follow-jumps -fno-dce -fno-early-inlini= ng -fgcse -fharden-conditional-branches -frerun-cse-after-loop -fno-tree-ccp -mavx5124fmaps testcase.c -wrapper valgrind,-q =3D=3D24674=3D=3D Invalid read of size 4 =3D=3D24674=3D=3D at 0x2242C56: insert_with_costs(rtx_def*, table_elt*, = unsigned int, machine_mode, int, int) (cse.c:1569) =3D=3D24674=3D=3D by 0x2244F70: insert (cse.c:1695) =3D=3D24674=3D=3D by 0x2244F70: merge_equiv_classes(table_elt*, table_el= t*) [clone .isra.0] (cse.c:1756) =3D=3D24674=3D=3D by 0x224F7F9: record_jump_equiv (cse.c:3891) =3D=3D24674=3D=3D by 0x224F7F9: cse_extended_basic_block (cse.c:6614) =3D=3D24674=3D=3D by 0x224F7F9: cse_main(rtx_insn*, int) [clone .constpr= op.0] (cse.c:6706) =3D=3D24674=3D=3D by 0x224FE40: rest_of_handle_cse2 (cse.c:7592) =3D=3D24674=3D=3D by 0x224FE40: (anonymous namespace)::pass_cse2::execut= e(function*) (cse.c:7645) =3D=3D24674=3D=3D by 0x126020C: execute_one_pass(opt_pass*) (passes.c:25= 67) =3D=3D24674=3D=3D by 0x1260A7F: execute_pass_list_1(opt_pass*) (passes.c= :2656) =3D=3D24674=3D=3D by 0x1260A91: execute_pass_list_1(opt_pass*) (passes.c= :2657) =3D=3D24674=3D=3D by 0x1260AB8: execute_pass_list(function*, opt_pass*) (passes.c:2667) =3D=3D24674=3D=3D by 0xE947D5: expand (cgraphunit.c:1834) =3D=3D24674=3D=3D by 0xE947D5: cgraph_node::expand() (cgraphunit.c:1787) =3D=3D24674=3D=3D by 0xE95D1F: expand_all_functions (cgraphunit.c:1998) =3D=3D24674=3D=3D by 0xE95D1F: symbol_table::compile() [clone .part.0] (cgraphunit.c:2362) =3D=3D24674=3D=3D by 0xE98957: compile (cgraphunit.c:2275) =3D=3D24674=3D=3D by 0xE98957: symbol_table::finalize_compilation_unit() (cgraphunit.c:2543) =3D=3D24674=3D=3D by 0x1369EFF: compile_file() (toplev.c:479) =3D=3D24674=3D=3D Address 0x40 is not stack'd, malloc'd or (recently) free= 'd =3D=3D24674=3D=3D=20 during RTL pass: cse2 testcase.c: In function 'foo': testcase.c:28:1: internal compiler error: Segmentation fault 28 | } | ^ 0x1369c3f crash_signal /repo/gcc-trunk/gcc/toplev.c:322 0x2242c56 insert_with_costs /repo/gcc-trunk/gcc/cse.c:1569 0x2244f70 insert /repo/gcc-trunk/gcc/cse.c:1695 0x2244f70 merge_equiv_classes /repo/gcc-trunk/gcc/cse.c:1756 0x224f7f9 record_jump_equiv /repo/gcc-trunk/gcc/cse.c:3891 0x224f7f9 cse_extended_basic_block /repo/gcc-trunk/gcc/cse.c:6614 0x224f7f9 cse_main /repo/gcc-trunk/gcc/cse.c:6706 0x224fe40 rest_of_handle_cse2 /repo/gcc-trunk/gcc/cse.c:7592 0x224fe40 execute /repo/gcc-trunk/gcc/cse.c:7645 Please submit a full bug report, with preprocessed source if appropriate. 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-r12-5492-20211124095444-= g04eccbbe3d9-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc= /x86_64-pc-linux-gnu/12.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-r12-5492-20211124095444-g04eccbbe3= d9-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.0 20211124 (experimental) (GCC)=