From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E42053850400; Wed, 2 Jun 2021 11:27:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E42053850400 From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/99122] [10 Regression] ICE in force_constant_size, at gimplify.c:733 Date: Wed, 02 Jun 2021 11:27:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jamborm at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jun 2021 11:27:01 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99122 Eric Botcazou changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot gnu.o= rg --- Comment #31 from Eric Botcazou --- > We talked about backporting the patches to GCC 10 with Richi on IRC today > and decided to wait for potential fallout even if we miss the 10.3 releas= e. The fallout is major in Ada for the return part because the logic completely overlooks the CALL_EXPR_RETURN_SLOT_OPT flag; when it is set, you don't nee= d to create a variable in the caller when inlining the function, so this works: procedure Inline22 (L, U : Integer) is type Arr is array (Integer range L .. U) of Boolean; function Get_Zero return Arr; pragma Inline_Always (Get_Zero); function Get_Zero return Arr is begin return (others =3D> False); end; A : Arr; begin A :=3D Get_Zero; end; eric@fomalhaut:~/install/gcc-10/bin/gcc -c inline22.adb=20 eric@fomalhaut:~/install/gcc-11/bin/gcc -c inline22.adb=20 inline22.adb: In function 'Inline22.Get_Zero': inline22.adb:10:3: error: function 'Inline22.Get_Zero' can never be inlined because it has a VLA return argument=