From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F0A733943429; Fri, 14 May 2021 21:10:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F0A733943429 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/100607] New: ICE with SELECT RANK Date: Fri, 14 May 2021 21:10:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: burnus at gcc dot gnu.org 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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: Fri, 14 May 2021 21:10:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100607 Bug ID: 100607 Summary: ICE with SELECT RANK Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Target Milestone: --- Created attachment 50815 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D50815&action=3Dedit Fortran testcase The following program works, if the invalid code is commented. The invalid part violates (quote from F202x but same in F2018): "C1158 A SELECT RANK construct shall not have aselect-rank-case-stmtthat= is RANK ( * ) if the selector23has the ALLOCATABLE or POINTER attribute." Hence, the code is invalid. Output is the following Notes: - '__tmp_INTEGER_4_rank_m1' error is bogus - 'cannot be used' error is valid, but should only be printed once - An ICE is always wrong, of course. 24 | rank(*) ! { dg-error "cannot be used with the pointer or allocatab= le selector" } Error: Allocatable array =E2=80=98__tmp_INTEGER_4_rank_m1=E2=80=99 at (1) m= ust have a deferred shape or assumed rank 24 | rank(*) ! { dg-error "cannot be used with the pointer or allocatab= le selector" } Error: RANK (*) at (1) cannot be used with the pointer or allocatable selec= tor at (2) 24 | rank(*) ! { dg-error "cannot be used with the pointer or allocatab= le selector" } Error: RANK (*) at (1) cannot be used with the pointer or allocatable selec= tor at (2) f951: internal compiler error: in simplify_bound, at fortran/simplify.c:4266 0x619680 simplify_bound ../../repos/gcc/gcc/fortran/simplify.c:4266=