From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 43C0E386F439; Wed, 10 Mar 2021 08:00:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 43C0E386F439 From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/99506] internal compiler error: in record_reference, at cgraphbuild.c:64 Date: Wed, 10 Mar 2021 08:00:11 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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, 10 Mar 2021 08:00:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99506 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- First, the compiler should not ICE. Second, your program likely has a bug, which is the cause of the ICE. Third, it's not clear if the middle-end can detect the issue. Fourth, it's clear the Fortran front-end does not catch the problem. Finally, here's a better reduced testcase. program fix_track_partials implicit none integer, parameter :: double =3D 8 integer, parameter :: lats100 =3D -4000, dlat100 =3D 10 integer, parameter :: jmax =3D 350 integer i, j integer, parameter:: & latt100(jmax) =3D [((lats100 + dlat100 * j - dlat100/2), j=3D1,jmax)] real(double), parameter:: latt(jmax) =3D [(latt100(i)/100.d0, j=3D1,jma= x)] real(double), allocatable:: ys(:), ys_fixed(:) ys =3D [1] call move_to_nearest(ys_fixed, pnts=3Dys, axis=3Dlatt) contains subroutine move_to_nearest(res, pnts, axis) real(double), intent(out):: res(:) real(double), intent(in) :: pnts(:), axis(:) end subroutine move_to_nearest end program fix_track_partials=