From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D0C6E3858CDB; Sat, 18 May 2024 08:09:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0C6E3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716019746; bh=MhwqNd+vDIG1A4DJ/NgKwbArLK7fru1z6+TSD/vOHSk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tQY1ycxI8TyJsMs6Y6jcCk3pVUkdielpKRDSGhfz1OpPFhBLO3eCxPrqKPIWLrQtC ns4Cev6v4OuJlkYcDO8zu2OupLZS7B6riQjUJcJOqfUfVtMt3hHCSt+LMkcam3+fEp 6vy0xx8sWfDFuxZ/IZZgTi3z3RpOeykm8QWKBnaE= From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/103312] [11/12/13/14/15 Regression] ICE in gfc_find_component since r9-1098-g3cf89a7b992d483e Date: Sat, 18 May 2024 08:09: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: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pault at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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=3D103312 --- Comment #9 from Paul Thomas --- (In reply to Paul Thomas from comment #7) > Created attachment 58231 [details] > Preliminary fix for this PR >=20 > I went back to the beginning on this problem, having realised that it is = far > too early to resolve the compcall of a class argument in > gfc_reduce_init_expr. Hence the chunk in expr.cc. The second chunk is > (possibly) a bit of a kludge and, I would have thought, should be checked, > at very least by checking that the class extends an abstract type. I will > come back to this - yard duty calls! >=20 > A reduced test case, without the module 'example' and no type extension a= lso > failed and is now fixed. Also failing in this reduced testcase was: > function func (this) result (string) > class(bar) :: this > character (:), allocatable :: string > allocate (character(this%size()) :: string) > string =3D repeat ("x", len (string)) > end function >=20 > Again, this is fixed. >=20 > Finally, the patch even regression tests OK :-) >=20 > Enough for now. >=20 > Paul I just noticed that the version on my tree has expr guarded in the addition= al condition in gfc_reduce_init_expr. Otherwise gfortran.dg/pr103588.f90 segfaults. Paul=