From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3DE983858D28; Fri, 19 Jan 2024 15:47:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3DE983858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705679276; bh=Sj5uWt/ZLQPCb/QvDQTJ2VdoNgW5SgDOkdIUhaH7YRU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qiRPweKu/8dieh4eHw0A83wzS26zHniwgLzX/YdD8w1j2BNhgWLui4TXfAus40/bn b0LFKf43eiNcOEslxyk+CWfQMCzYuXuoGLF/MDQgPNSpj8yhMqsWFSulhF1CeIJ3ra 6Mjg4Y21bASDattsg4ulJwcud8XmbsWN0R1qIKcc= From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113491] ICE: SIGSEGV in make_ssa_name_fn (tree-ssanames.cc:354) at -Os with _BitInt() used as switch control expression Date: Fri, 19 Jan 2024 15:47:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: attachments.created 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113491 --- Comment #1 from Zdenek Sojka --- Created attachment 57162 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57162&action=3Dedit shorter testcase (reduced from gcc.dg/torture/pr45830.c) $ x86_64-pc-linux-gnu-gcc -Os pr45830.i -wrapper valgrind,-q =3D=3D7594=3D=3D Invalid read of size 2 =3D=3D7594=3D=3D at 0x177D97A: make_ssa_name_fn(function*, tree_node*, g= imple*, unsigned int) (tree-ssanames.cc:354) =3D=3D7594=3D=3D by 0x1610F62: make_ssa_name (tree-ssanames.h:98) =3D=3D7594=3D=3D by 0x1610F62: tree_switch_conversion::switch_conversion::build_arrays() (tree-switch-conversion.cc:727) =3D=3D7594=3D=3D by 0x1611346: tree_switch_conversion::switch_conversion::expand(gswitch*) [clone .part.0] (tree-switch-conversion.cc:1067) =3D=3D7594=3D=3D by 0x161140A: expand (tree-switch-conversion.cc:2546) =3D=3D7594=3D=3D by 0x161140A: (anonymous namespace)::pass_convert_switch::execute(function*) (tree-switch-conversion.cc:2564) =3D=3D7594=3D=3D by 0x13CC0EA: execute_one_pass(opt_pass*) (passes.cc:26= 46) =3D=3D7594=3D=3D by 0x13CC9DF: execute_pass_list_1(opt_pass*) (passes.cc= :2755) =3D=3D7594=3D=3D by 0x13CC9F1: execute_pass_list_1(opt_pass*) (passes.cc= :2756) =3D=3D7594=3D=3D by 0x13CCA18: execute_pass_list(function*, opt_pass*) (passes.cc:2766) =3D=3D7594=3D=3D by 0x13CD33C: do_per_function_toporder(void (*)(functio= n*, void*), void*) [clone .part.0] (passes.cc:1773) =3D=3D7594=3D=3D by 0x13CD56E: do_per_function_toporder (passes.cc:1740) =3D=3D7594=3D=3D by 0x13CD56E: execute_ipa_pass_list(opt_pass*) (passes.= cc:3100) =3D=3D7594=3D=3D by 0xFCDDE7: ipa_passes (cgraphunit.cc:2211) =3D=3D7594=3D=3D by 0xFCDDE7: symbol_table::compile() [clone .part.0] (cgraphunit.cc:2332) =3D=3D7594=3D=3D by 0xFD0667: compile (cgraphunit.cc:2312) =3D=3D7594=3D=3D by 0xFD0667: symbol_table::finalize_compilation_unit() (cgraphunit.cc:2584) =3D=3D7594=3D=3D Address 0x0 is not stack'd, malloc'd or (recently) free'd =3D=3D7594=3D=3D=20 during GIMPLE pass: switchconv pr45830.i: In function 'foo': pr45830.i:19:1: internal compiler error: Segmentation fault 19 | } | ^ 0x150de9f crash_signal /repo/gcc-trunk/gcc/toplev.cc:317 0x177d97a make_ssa_name_fn(function*, tree_node*, gimple*, unsigned int) /repo/gcc-trunk/gcc/tree-ssanames.cc:354 0x1610f62 make_ssa_name(tree_node*, gimple*) /repo/gcc-trunk/gcc/tree-ssanames.h:98 0x1610f62 tree_switch_conversion::switch_conversion::build_arrays() /repo/gcc-trunk/gcc/tree-switch-conversion.cc:727 0x1611346 tree_switch_conversion::switch_conversion::expand(gswitch*) /repo/gcc-trunk/gcc/tree-switch-conversion.cc:1067 0x161140a tree_switch_conversion::switch_conversion::expand(gswitch*) /repo/gcc-trunk/gcc/tree-switch-conversion.cc:2546 0x161140a execute /repo/gcc-trunk/gcc/tree-switch-conversion.cc:2564 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.=