From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F0BE385843E; Tue, 22 Nov 2022 17:42:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F0BE385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669138966; bh=Vv4xLpX5ZDUUCmo2siwugxdCcjaxAww9da6DBnxkIHA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gtYCW+iwzWKgIEykUbCIoO0hxfrx2yCZodVx6NO928uD7bpmquAPFpsXWFBjXlfTX 4ZEVoKxFaXFbRCyI19cjv3EUDFGkTr88oXYOP/d8yYEwpd589RgxgrrHUOKHqQRyRt wu3BolSeQ+EDToVfpHem7y4xBGvi8+xgS8eieOc4= From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107819] ICE in gfc_check_argument_var_dependency, at fortran/dependency.cc:978 Date: Tue, 22 Nov 2022 17:42:42 +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: 13.0 X-Bugzilla-Keywords: 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107819 --- Comment #1 from G. Steinmetz --- Works here with explicitly enforced evaluation (a(n)) : $ cat z3.f90 program p integer :: a(4) =3D [-1, -2, -3, -4] integer :: n(4) =3D [4, 2, 1, 3] call s ((a(n)), a) print *, a contains elemental subroutine s (x, y) integer, value :: x integer, intent(out) :: y y =3D x end end $ cat z8.f90 program p implicit none integer, parameter :: m =3D 99 integer :: i integer :: a(m) =3D [(-i,i=3D1,m)] call s ((a(m:1:-1)), a) print '(10i6)', a contains elemental subroutine s (x, y) integer, value :: x integer, intent(out) :: y y =3D x end end $ cat z9.f90 program p implicit none integer, parameter :: m =3D 99 integer :: i integer :: a(m) =3D [(-i,i=3D1,m)] integer :: n(m) =3D [(i,i=3Dm,1,-1)] call s ([a(n)], a) print '(10i6)', a contains elemental subroutine s (x, y) integer, value :: x integer, intent(out) :: y y =3D x end end $ gfortran-13-20221120 z3.f90 && ./a.out -4 -2 -1 -3 $=