From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 50B303858C52; Sun, 3 Sep 2023 22:37:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 50B303858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693780662; bh=WlmOGjN6+0HHIMvbVz0E9KvMgf+TenNlT2qn32SHB3g=; h=From:To:Subject:Date:From; b=IA+W1Rr8tVev0yWD2ANxzeMYYE6w3PP49mplF8B4uWdw60vfSSB7M8ipj2IjW3OU5 6drrOfZ9ciLneTK0f3EDmW1Hw5zIwe64CK/QDlwwfGQwthYlihCw56VzxBxb72Mdpk t7FwSXdtd+p0WR2jtJzO5BmG1UCV/LNcBEZ8/DeA= From: "vincent.riviere at freesbee dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111279] New: ICE: Segmentation fault with m68k,SJLJ and -malign-int Date: Sun, 03 Sep 2023 22:37:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vincent.riviere at freesbee dot fr 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 bug_severity priority component assigned_to reporter target_milestone 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=3D111279 Bug ID: 111279 Summary: ICE: Segmentation fault with m68k,SJLJ and -malign-int Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vincent.riviere at freesbee dot fr Target Milestone: --- m68k-elf-g++ causes "internal compiler error: Segmentation fault" when configured for m68k-elf, SJLJ exceptions, and compiling a specific program = with -malign-int. $ cat >bug.cc < struct A { A() { } char buf[4]; }; template struct B : public A { B() { } }; template struct C : public B { C() throw() { } }; void f() { C tmp; } EOF gcc was configured with: ~/sources/gcc/configure --target=3Dm68k-elf --disable-nls --disable-multilib --enable-languages=3D"c,c++" --disable-libstdc++-pch --disable-lto --enable-sjlj-exceptions $ /home/vincent/compil/gccelfsjlj.obj/gcc/cc1plus bug.cc -malign-int A::A() B::B() C::C() void f() C B A C::C() [= with T =3D char] C::C() [with T =3D char] C::C() [with T =3D char] B::B= () [with T =3D char] B::B() [with T =3D char] B::B() [with T =3D char] A::A()= [with T =3D char] A::A() [with T =3D char] A::A() [with T =3D char] Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> {heap 1068k} {heap 1068k} {heap 1068k} {heap 1348k} {heap 1348k} {heap 1348k} {heap 1348k}Streaming LTO {heap 1348k} {heap 1348k} {heap 1348k} {heap 1348k} {heap 1348k} {heap 1348= k} {heap 1348k}Assembling functions: void f() C::C() [with T =3D char]during RTL pass: expand bug.cc: In constructor 'C::C() [with T =3D char]': bug.cc:21:5: internal compiler error: Segmentation fault 21 | { } | ^ 0x1174ec3 crash_signal /home/vincent/sources/gcc/gcc/toplev.cc:314 0x7f7ca4a3c4af ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0xe08653 assign_temp(tree_node*, int, int) /home/vincent/sources/gcc/gcc/function.cc:976 0xdab01f emit_push_insn(rtx_def*, machine_mode, tree_node*, rtx_def*, unsig= ned int, int, rtx_def*, poly_int<1u, long>, rtx_def*, rtx_def*, int, rtx_def*, bool) /home/vincent/sources/gcc/gcc/expr.cc:4920 0xc5f915 emit_library_call_value_1(int, rtx_def*, rtx_def*, libcall_type, machine_mode, int, std::pair*) /home/vincent/sources/gcc/gcc/calls.cc:4585 0xd765bf emit_library_call(rtx_def*, libcall_type, machine_mode, rtx_def*, machine_mode) /home/vincent/sources/gcc/gcc/rtl.h:4343 0xd765bf sjlj_emit_function_enter /home/vincent/sources/gcc/gcc/except.cc:1212 0xd7b90d sjlj_build_landing_pads /home/vincent/sources/gcc/gcc/except.cc:1491 0xd7b90d finish_eh_generation() /home/vincent/sources/gcc/gcc/except.cc:1520 0xc7c1a6 execute /home/vincent/sources/gcc/gcc/cfgexpand.cc:6940 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. $ /home/vincent/compil/gccelfsjlj.obj/gcc/cc1plus bug.cc -malign-int A::A() B::B() C::C() void f() C B A C::C() [= with T =3D char] C::C() [with T =3D char] C::C() [with T =3D char] B::B= () [with T =3D char] B::B() [with T =3D char] B::B() [with T =3D char] A::A()= [with T =3D char] A::A() [with T =3D char] A::A() [with T =3D char] Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> {heap 1068k} {heap 1068k} {heap 1068k} {heap 1348k} {heap 1348k} {heap 1348k} {heap 1348k}Streaming LTO {heap 1348k} {heap 1348k} {heap 1348k} {heap 1348k} {heap 1348k} {heap 1348= k} {heap 1348k}Assembling functions: void f() C::C() [with T =3D char]during RTL pass: expand bug.cc: In constructor 'C::C() [with T =3D char]': bug.cc:21:5: internal compiler error: Segmentation fault 21 | { } | ^ 0x1174ec3 crash_signal /home/vincent/sources/gcc/gcc/toplev.cc:314 0x7f7ca4a3c4af ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0xe08653 assign_temp(tree_node*, int, int) /home/vincent/sources/gcc/gcc/function.cc:976 0xdab01f emit_push_insn(rtx_def*, machine_mode, tree_node*, rtx_def*, unsig= ned int, int, rtx_def*, poly_int<1u, long>, rtx_def*, rtx_def*, int, rtx_def*, bool) /home/vincent/sources/gcc/gcc/expr.cc:4920 0xc5f915 emit_library_call_value_1(int, rtx_def*, rtx_def*, libcall_type, machine_mode, int, std::pair*) /home/vincent/sources/gcc/gcc/calls.cc:4585 0xd765bf emit_library_call(rtx_def*, libcall_type, machine_mode, rtx_def*, machine_mode) /home/vincent/sources/gcc/gcc/rtl.h:4343 0xd765bf sjlj_emit_function_enter /home/vincent/sources/gcc/gcc/except.cc:1212 0xd7b90d sjlj_build_landing_pads /home/vincent/sources/gcc/gcc/except.cc:1491 0xd7b90d finish_eh_generation() /home/vincent/sources/gcc/gcc/except.cc:1520 0xc7c1a6 execute /home/vincent/sources/gcc/gcc/cfgexpand.cc:6940 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. Tested with the current master branch (GCC 14), and also with GCC 13.2.0.=