public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/113491] New: ICE: SIGSEGV in make_ssa_name_fn (tree-ssanames.cc:354) at -Os with _BitInt() used as switch control expression
@ 2024-01-18 19:48 zsojka at seznam dot cz
  2024-01-19 15:47 ` [Bug tree-optimization/113491] " zsojka at seznam dot cz
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2024-01-18 19:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113491

            Bug ID: 113491
           Summary: ICE: SIGSEGV in make_ssa_name_fn
                    (tree-ssanames.cc:354) at -Os with _BitInt() used as
                    switch control expression
           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
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 57146
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57146&action=edit
reduced testcase (from gcc.c-torture/compile/pr34093.c -Dint=_BitInt(617) )

Compiler output:
$ x86_64-pc-linux-gnu-gcc -Os testcase.c -wrapper valgrind,-q
==8560== Invalid read of size 2
==8560==    at 0x177D8AA: make_ssa_name_fn(function*, tree_node*, gimple*,
unsigned int) (tree-ssanames.cc:354)
==8560==    by 0x1610EB2: make_ssa_name (tree-ssanames.h:98)
==8560==    by 0x1610EB2:
tree_switch_conversion::switch_conversion::build_arrays()
(tree-switch-conversion.cc:727)
==8560==    by 0x1611296:
tree_switch_conversion::switch_conversion::expand(gswitch*) [clone .part.0]
(tree-switch-conversion.cc:1067)
==8560==    by 0x161135A: expand (tree-switch-conversion.cc:2546)
==8560==    by 0x161135A: (anonymous
namespace)::pass_convert_switch::execute(function*)
(tree-switch-conversion.cc:2564)
==8560==    by 0x13CC03A: execute_one_pass(opt_pass*) (passes.cc:2646)
==8560==    by 0x13CC92F: execute_pass_list_1(opt_pass*) (passes.cc:2755)
==8560==    by 0x13CC941: execute_pass_list_1(opt_pass*) (passes.cc:2756)
==8560==    by 0x13CC968: execute_pass_list(function*, opt_pass*)
(passes.cc:2766)
==8560==    by 0x13CD28C: do_per_function_toporder(void (*)(function*, void*),
void*) [clone .part.0] (passes.cc:1773)
==8560==    by 0x13CD4BE: do_per_function_toporder (passes.cc:1740)
==8560==    by 0x13CD4BE: execute_ipa_pass_list(opt_pass*) (passes.cc:3100)
==8560==    by 0xFCDD37: ipa_passes (cgraphunit.cc:2211)
==8560==    by 0xFCDD37: symbol_table::compile() [clone .part.0]
(cgraphunit.cc:2332)
==8560==    by 0xFD05B7: compile (cgraphunit.cc:2312)
==8560==    by 0xFD05B7: symbol_table::finalize_compilation_unit()
(cgraphunit.cc:2584)
==8560==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==8560== 
during GIMPLE pass: switchconv
testcase.c: In function 'foo':
testcase.c:263:1: internal compiler error: Segmentation fault
  263 | }
      | ^
0x150ddef crash_signal
        /repo/gcc-trunk/gcc/toplev.cc:317
0x177d8aa make_ssa_name_fn(function*, tree_node*, gimple*, unsigned int)
        /repo/gcc-trunk/gcc/tree-ssanames.cc:354
0x1610eb2 make_ssa_name(tree_node*, gimple*)
        /repo/gcc-trunk/gcc/tree-ssanames.h:98
0x1610eb2 tree_switch_conversion::switch_conversion::build_arrays()
        /repo/gcc-trunk/gcc/tree-switch-conversion.cc:727
0x1611296 tree_switch_conversion::switch_conversion::expand(gswitch*)
        /repo/gcc-trunk/gcc/tree-switch-conversion.cc:1067
0x161135a tree_switch_conversion::switch_conversion::expand(gswitch*)
        /repo/gcc-trunk/gcc/tree-switch-conversion.cc:2546
0x161135a 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 <https://gcc.gnu.org/bugs/> for instructions.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-20 17:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18 19:48 [Bug tree-optimization/113491] New: ICE: SIGSEGV in make_ssa_name_fn (tree-ssanames.cc:354) at -Os with _BitInt() used as switch control expression zsojka at seznam dot cz
2024-01-19 15:47 ` [Bug tree-optimization/113491] " zsojka at seznam dot cz
2024-01-19 17:29 ` jakub at gcc dot gnu.org
2024-01-20 11:37 ` cvs-commit at gcc dot gnu.org
2024-01-20 11:38 ` jakub at gcc dot gnu.org
2024-01-20 17:11 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).