From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7875E385780F; Tue, 3 Aug 2021 07:41:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7875E385780F From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/101729] ICE in create_tmp_var, at gimple-expr.c:482 Date: Tue, 03 Aug 2021 07:41:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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: everconfirmed bug_status cf_reconfirmed_on 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: Tue, 03 Aug 2021 07:41:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101729 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2021-08-03 --- Comment #1 from Richard Biener --- The odd thing is that 'g' has a DECL_RESULT of void type but the function t= ype of 'g' has a return type of integer(kind=3D4) ... unit-size align:32 warn_if_not_align:0 symtab:0 alias-set 1 canonical-type 0x7ffff65585e8 precision:32 min max pointer_to_this reference_to_this > QI size unit-size align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff6718b28 arg-types chain >> pointer_to_this > addressable used nothrow public static QI t.f90:4:12 align:8 warn_if_not_align:0 context initial result > ipa-split does if (split_point->split_part_set_retval && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (current_function_decl)= ))) { retval =3D DECL_RESULT (current_function_decl); /* We use temporary register to hold value when aggregate_val= ue_p is false. Similarly for DECL_BY_REFERENCE we must avoid e= xtra copy. */ if (!aggregate_value_p (retval, TREE_TYPE (current_function_decl)) && !DECL_BY_REFERENCE (retval)) retval =3D create_tmp_reg (TREE_TYPE (retval)); interestingly when fixing the bogus call g(1, *99) then the return type of the function is void as expected.=