From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 498D8385842B; Wed, 22 Sep 2021 23:18:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 498D8385842B From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/102458] ICE tree check: expected array_type, have pointer_type in gfc_conv_array_initializer, at fortran/trans-array.c:6136 Date: Wed, 22 Sep 2021 23:18:19 +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: sgk at troutmask dot apl.washington.edu 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: 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, 22 Sep 2021 23:18:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102458 --- Comment #8 from Steve Kargl -= -- On Wed, Sep 22, 2021 at 09:17:18PM +0000, anlauf at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102458 >=20 > anlauf at gcc dot gnu.org changed: >=20 > What |Removed |Added > -------------------------------------------------------------------------= --- > Attachment #51497|0 |1 > is obsolete| | >=20 > --- Comment #7 from anlauf at gcc dot gnu.org --- > Created attachment 51498 > --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D51498&action=3Dedit > Revised patch including testcase >=20 I think TRANSFER needs to be handled differently. >>From the same section of the Fortran standard, TRANSFER is rejected if the following does not apply. (8) a reference to the intrinsic function TRANSFER where each argument is a constant expression and each ultimate pointer component of the SOURCE argument is disassociated, So, one should be able to do something like integer,parameter :: n =3D 4 integer,parameter :: x(transfer(n, n)) =3D 1 print *, x end which gfortran will give=20 % gfortran10 -o z a.f90 % ./z 1 1 1 1 If you remove TRANSFER from the patch, it looks good to me. We can revisit TRANSFER when Gerhard breaks gfortran, again! ;-)=