From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ED3FE3858C60; Fri, 31 May 2024 01:24:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED3FE3858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717118677; bh=V/5urkc2rcfc2VxHVCdFnk6zeN2fETmX+HcHuQugbkw=; h=From:To:Subject:Date:From; b=YRi0cdv7ZsNjd2LvfLuI+13WrL63EuU4ik8kk4l/mwj1O0EOrfps5UND/p97O14tS qsgQvxwT+RtLBSzOMuJaeYCx5h/zhIn9pGZ1eE9J+JWLfzCQ00qTDQemghjKEJUWMJ Afh2cB8nCZl1Oumt5iswjGCtJZhnWvVRHntkFvt0= From: "matoro_gcc_bugzilla at matoro dot tk" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/115297] New: [14 regression] alpha: ICE in simplify_subreg, at simplify-rtx.cc:7554 with -O1 Date: Fri, 31 May 2024 01:24:34 +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: 14.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: matoro_gcc_bugzilla at matoro dot tk 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 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=3D115297 Bug ID: 115297 Summary: [14 regression] alpha: ICE in simplify_subreg, at simplify-rtx.cc:7554 with -O1 Product: gcc Version: 14.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: matoro_gcc_bugzilla at matoro dot tk Target Milestone: --- Target: alpha-unknown-linux-gnu Created attachment 58314 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D58314&action=3Dedit gdb context and complete backtrace Found this while building kernel with gcc-14. This reproduces on cross, so using that as an example. Minimized: enum { BPF_F_USER_BUILD_ID } __bpf_get_stack_size; long __bpf_get_stack_flags, bpf_get_stack___trans_tmp_2; void bpf_get_stack() { unsigned elem_size; int err =3D elem_size =3D __bpf_get_stack_flags ?: sizeof(long); if (__builtin_expect(__bpf_get_stack_size % elem_size, 0)) bpf_get_stack___trans_tmp_2 =3D err; } $ alpha-unknown-linux-gnu-gcc-14 -O1 -c stackmap.i during RTL pass: combine stackmap.i: In function =E2=80=98bpf_get_stack=E2=80=99: stackmap.i:8:1: internal compiler error: in simplify_subreg, at simplify-rtx.cc:7554 8 | } | ^ Backtrace summary (more detailed bt with locals and snippets in attachment): #0 internal_error (gmsgid=3D0x1033e41b0 "in %s, at %s:%d") at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/diagnostic.cc:2227 #1 0x0000000102ff9cac in fancy_abort (file=3D0x103272d20 "/var/tmp/portage/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/work/g= cc-14-20240518/gcc/simplify-rtx.cc", line=3D7554,=20 function=3D0x1032731f0 "simplify_subreg") at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/diagnostic.cc:2353 #2 0x00000001017b5ea4 in simplify_context::simplify_subreg (this=3D0x7fffffff9f00, outermode=3DE_DImode, op=3D0x7ffff5448c28, innermode=3DE_SImode, byte=3D...) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/simplify-rtx.cc:7554 #3 0x00000001017b8da8 in simplify_context::simplify_subreg (this=3D0x7fffffff9f00, outermode=3DE_DImode, op=3D0x7ffff5449ff0, innermode=3DE_SImode, byte=3D...) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/simplify-rtx.cc:7804 #4 0x00000001017b988c in simplify_context::simplify_gen_subreg (this=3D0x7fffffff9f00, outermode=3DE_DImode, op=3D0x7ffff5449ff0, innermode=3DE_SImode, byte=3D...) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/simplify-rtx.cc:7875 #5 0x0000000100bb6224 in simplify_gen_subreg (outermode=3DE_DImode, op=3D0x7ffff5449ff0, innermode=3DE_SImode, byte=3D...) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/rtl.h:3552 #6 0x00000001028f87dc in if_then_else_cond (x=3D0x7ffff5449f60, ptrue=3D0x7fffffffa528, pfalse=3D0x7fffffffa538) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/combine.cc:9423 #7 0x00000001028f55ec in if_then_else_cond (x=3D0x7ffff5449f78, ptrue=3D0x7fffffffa948, pfalse=3D0x7fffffffa958) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/combine.cc:9286 #8 0x00000001028f55ec in if_then_else_cond (x=3D0x7ffff5449f90, ptrue=3D0x7fffffffb148, pfalse=3D0x7fffffffb150) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/combine.cc:9286 #9 0x00000001028bf07c in combine_simplify_rtx (x=3D0x7ffff5449f90, op0_mode=3DE_VOIDmode, in_dest=3Dfalse, in_cond=3Dfalse) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/combine.cc:5758 #10 0x00000001028bc3d8 in subst (x=3D0x7ffff5449f90, from=3D0x7ffff54488c8, to=3D0x7ffff5451920, in_dest=3Dfalse, in_cond=3Dfalse, unique_copy=3Dfalse) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/combine.cc:5619 #11 0x00000001028bba88 in subst (x=3D0x7ffff5448cb8, from=3D0x7ffff54488c8, to=3D0x7ffff5451920, in_dest=3Dfalse, in_cond=3Dfalse, unique_copy=3Dfalse) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/combine.cc:5546 #12 0x00000001028babe8 in subst (x=3D0x7ffff54a68a0, from=3D0x7ffff54488c8, to=3D0x7ffff5451920, in_dest=3Dfalse, in_cond=3Dfalse, unique_copy=3Dfalse) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/combine.cc:5480 #13 0x000000010289ba0c in try_combine (i3=3D0x7ffff54e0540, i2=3D0x7ffff54e= 0500, i1=3D0x7ffff54e06c0, i0=3D0x0, new_direct_jump_p=3D0x7fffffffe2df, last_combined_insn=3D0x7ffff54e0540) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/combine.cc:3349 #14 0x000000010288c22c in combine_instructions (f=3D0x7ffff54009a0, nregs= =3D88) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/combine.cc:1285 #15 0x0000000102933030 in rest_of_handle_combine () at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/combine.cc:15114 #16 0x00000001029331d0 in (anonymous namespace)::pass_combine::execute (this=3D0x103922900) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/combine.cc:15158 #17 0x000000010150c264 in execute_one_pass (pass=3D0x103922900) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/passes.cc:2647 #18 0x000000010150c7c4 in execute_pass_list_1 (pass=3D0x103922900) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/passes.cc:2756 #19 0x000000010150c80c in execute_pass_list_1 (pass=3D0x103921d60) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/passes.cc:2757 #20 0x000000010150c8ac in execute_pass_list (fn=3D0x7ffff5670000, pass=3D0x10391d3f0) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/passes.cc:2767 #21 0x0000000100cb35dc in cgraph_node::expand (this=3D0x7ffff56a0000) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/cgraphunit.cc:1845 #22 0x0000000100cb4094 in expand_all_functions () at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/cgraphunit.cc:2028 #23 0x0000000100cb5148 in symbol_table::compile (this=3D0x7ffff5480000) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/cgraphunit.cc:2404 #24 0x0000000100cb596c in symbol_table::finalize_compilation_unit (this=3D0x7ffff5480000) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/cgraphunit.cc:2589 #25 0x0000000101809178 in compile_file () at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/toplev.cc:476 #26 0x000000010180e000 in do_compile () at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/toplev.cc:2158 #27 0x000000010180e690 in toplev::main (this=3D0x7fffffffeb52, argc=3D11, argv=3D0x7fffffffefa8) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/toplev.cc:2314 #28 0x0000000102fb4674 in main (argc=3D11, argv=3D0x7fffffffefa8) at /usr/src/debug/cross-alpha-unknown-linux-gnu/gcc-14.1.1_p20240518/gcc-14-20= 240518/gcc/main.cc:39=