From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 238AD396B439; Tue, 3 Aug 2021 18:35:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 238AD396B439 From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/101762] ICE in ix86_push_argument, at config/i386/i386.c:4203 Date: Tue, 03 Aug 2021 18:35:57 +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: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de 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: keywords cf_gcctarget 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 18:35:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101762 G. Steinmetz changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code Target| |x86_64-pc-linux-gnu --- Comment #1 from G. Steinmetz --- This expanded variant results in an error (an indirect hint) : $ cat zz2.f90 program p integer, target :: a(3) =3D [7, 8, 9] integer, pointer :: x =3D> a(n()) print *, x contains pure integer function n() n =3D 2 end end $ gfortran-12-20210801 -c zz2.f90 zz2.f90:6:3: 6 | pure integer function n() | 1 Error: INTERNAL-PROC procedure at (1) is already declared as EXTERNAL-PROC procedure And for completeness, a correct version could look like this : $ cat zz3.f90 program p integer, target :: a(3) =3D [7, 8, 9] integer, pointer :: x x =3D> a(n()) print *, x contains pure integer function n() n =3D 2 end end $ gfortran-12-20210801 zz3.f90 && ./a.out 8 $=