From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C73F03858D34; Mon, 10 Jun 2024 07:13:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C73F03858D34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718003635; bh=CFnBBUNqOWG4yS8E88oBWVEFZPlsp6D5ldNRy88zDNg=; h=From:To:Subject:Date:From; b=j6maVStzbrpXo8NK3IAzoAd/k0cSQ+FsY7pxfFDMRA131ylzvfkQF4MN6C1ziWVEM wW6j4QwNNupbHlEOA9OxefnOm0MgzU9DADEgsAdAWZQIqjwoOY92ZsAQ+zpuk4yfWg gPkwAlltpm28t0tFB5++IDZD4hZNGEAoMK0zp58g= From: "iamanonymous.cs at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/115411] New: ICE : in expand_call, at calls.cc:3668 Date: Mon, 10 Jun 2024 07:13:55 +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: 15.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iamanonymous.cs at gmail dot com 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=3D115411 Bug ID: 115411 Summary: ICE : in expand_call, at calls.cc:3668 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: iamanonymous.cs at gmail dot com Target Milestone: --- ***************************************************************************= **** The compiler produces an internal error during the expand RTL pass when compiling the provided code with the specified options.=20 This problem occurs on both gcc and g++. The issue can also be reproduced on Compiler Explorer. ***************************************************************************= **** OS and Platform: # uname -a Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux ***************************************************************************= **** # gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/root/gdbtest/gcc/gcc-15/libexec/gcc/x86_64-pc-linux-= gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /root/gdbtest/gcc/obj/../gcc/configure --prefix=3D/root/gdbtest/gcc/gcc-15 --enable-languages=3Dc,c++,fortran,go --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20240509 (experimental) (GCC)=20 # g++ -v Using built-in specs. COLLECT_GCC=3Dg++ COLLECT_LTO_WRAPPER=3D/root/gdbtest/gcc/gcc-15/libexec/gcc/x86_64-pc-linux-= gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /root/gdbtest/gcc/obj/../gcc/configure --prefix=3D/root/gdbtest/gcc/gcc-15 --enable-languages=3Dc,c++,fortran,go --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20240509 (experimental) (GCC)=20 ***************************************************************************= **** Program: # z2.cc typedef struct { char c[0x40000001]; } s; void f (s); int g (s *x) { f (*x); } ***************************************************************************= **** Command Lines: For g++: # g++ z2.cc -Werror -O2 -ftrapv -fstack-protector-strong -o z2.out /root/gdbtest/gcctest/gcc_llvm/gcc/z2.cc: In function =E2=80=98int g(s*)=E2= =80=99: /root/gdbtest/gcctest/gcc_llvm/gcc/z2.cc:6:1: error: no return statement in function returning non-void [-Werror=3Dreturn-type] 6 | } | ^ /root/gdbtest/gcctest/gcc_llvm/gcc/z2.cc:5:5: sorry, unimplemented: passing= too large argument on stack 5 | f (*x); | ~~^~~~ during RTL pass: expand /root/gdbtest/gcctest/gcc_llvm/gcc/z2.cc:5:5: internal compiler error: in expand_call, at calls.cc:3668 0x894771 expand_call(tree_node*, rtx_def*, int) /root/gdbtest/gcc/obj/../gcc/gcc/calls.cc:3668 0xf8fe8e expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /root/gdbtest/gcc/obj/../gcc/gcc/expr.cc:12364 0xe65f8d expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier) /root/gdbtest/gcc/obj/../gcc/gcc/expr.h:316 0xe65f8d expand_call_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cfgexpand.cc:2884 0xe65f8d expand_gimple_stmt_1 /root/gdbtest/gcc/obj/../gcc/gcc/cfgexpand.cc:3951 0xe65f8d expand_gimple_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cfgexpand.cc:4093 0xe66a47 expand_gimple_basic_block /root/gdbtest/gcc/obj/../gcc/gcc/cfgexpand.cc:6149 0xe686c6 execute /root/gdbtest/gcc/obj/../gcc/gcc/cfgexpand.cc:6888 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. For gcc: # gcc z2.cc -Werror -O2 -ftrapv -fstack-protector-strong -o z2.out z2.cc: In function =E2=80=98int g(s*)=E2=80=99: z2.cc:6:1: error: no return statement in function returning non-void [-Werror=3Dreturn-type] 6 | } | ^ z2.cc:5:5: sorry, unimplemented: passing too large argument on stack 5 | f (*x); | ~~^~~~ during RTL pass: expand z2.cc:5:5: internal compiler error: in expand_call, at calls.cc:3668 0x894771 expand_call(tree_node*, rtx_def*, int) /root/gdbtest/gcc/obj/../gcc/gcc/calls.cc:3668 0xf8fe8e expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /root/gdbtest/gcc/obj/../gcc/gcc/expr.cc:12364 0xe65f8d expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier) /root/gdbtest/gcc/obj/../gcc/gcc/expr.h:316 0xe65f8d expand_call_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cfgexpand.cc:2884 0xe65f8d expand_gimple_stmt_1 /root/gdbtest/gcc/obj/../gcc/gcc/cfgexpand.cc:3951 0xe65f8d expand_gimple_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cfgexpand.cc:4093 0xe66a47 expand_gimple_basic_block /root/gdbtest/gcc/obj/../gcc/gcc/cfgexpand.cc:6149 0xe686c6 execute /root/gdbtest/gcc/obj/../gcc/gcc/cfgexpand.cc:6888 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. ***************************************************************************= **** Also ICE on trunk, compiler explorer: g++: https://godbolt.org/z/Kr4dvWKrE gcc : https://godbolt.org/z/cdb87oG84 ***************************************************************************= ****=