From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A112F3858C5F; Fri, 26 May 2023 21:00:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A112F3858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685134803; bh=f9DdYXkAP69kKHxPUtmogPDBKr388WPWD9A3hLQd7vQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nRTdVt0O8kv0/V+FcIdvJKcFC0HZJqgaTQ4khApbYolAPCqrI/Aioedr0qQLvX4It ltGsZjzjvij7Favyc6ruEnJ1tZs8kSjqdPjRH7IwYglUos3x20GQjw3BWVb1hS1kBo GLo5ee3/Y2mnntroALjHxvTiTu0ES4LnQcDVwLM4= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/109948] [13/14 Regression] ICE(segfault) in gfc_expression_rank() from gfc_op_rank_conformable() Date: Fri, 26 May 2023 21:00:03 +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.1.1 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf 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: 13.2 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=3D109948 --- Comment #11 from anlauf at gcc dot gnu.org --- (In reply to Paul Thomas from comment #9) > By the way, the patch regtests OK >=20 > Do you want to do the honours or shall I? >=20 > I think that this rates as an 'obvious' fix. I think it does not handle the following variation of the testcase from the blamed patch: module mm implicit none interface operator(=3D=3D) module procedure eq_1_2 end interface operator(=3D=3D) private :: eq_1_2 contains logical function eq_1_2 (x, y) integer, intent(in) :: x(:) real, intent(in) :: y(:,:) eq_1_2 =3D .true. end function eq_1_2 end module mm subroutine foo(k_2d) use mm implicit none integer :: k_2d(:) integer :: m(1) =3D 42 real :: r(1,1) =3D 3.0 print *, (m =3D=3D r) associate (k=3D>k_2d) print *, (k =3D=3D r) ! <-- fails end associate associate (k=3D>k_2d(:)) print *, (k =3D=3D r) end associate end subroutine foo For the marked line, I see in the debugger that e->ref =3D=3D NULL. I've played with some modification of the related code block, but that regressed on two of the associate testcases.=