From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 41D363858D28; Mon, 6 Nov 2023 15:34:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 41D363858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699284884; bh=iO0YtKCI6+QdWdWxmQ7mGp9xxOGPw0HZsFQGELBYoBQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yM2pYJ+xPB0GAmX5rJYUyG1nzBHtZ2X0bUrMDvSUgN41AP9q9iK75LWK9710OfKEA Mp/OsSLe9tDR6WhAbIlLdJLMFmq0MFh9tYGPeh4oiwKoF0ivAmU79mRvMUtZm4z/AF DlWgzZHq7QaGxZIpHHjQuNhGRHI0UzsaataCAj3g= From: "trnka at scm dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/109684] compiling failure: complaining about a final subroutine of a type being not PURE (while it is indeed PURE) Date: Mon, 06 Nov 2023 15:34: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.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: trnka at scm dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: pault 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=3D109684 --- Comment #24 from Tom=C3=A1=C5=A1 Trnka --- (In reply to Steve Kargl from comment #23) > If expr->where is pointing to NULL, then something is definitely not > set up correctly or your code is now going through a different code > path in the compiler.=20=20 Sorry for the delay with testing this, I was busy with other more pressing tasks. It's not that expr->where would be NULL completely, but its components (nex= tc and lb) are both NULL. > If this is related to setting up the artificial __final_* procedure, > then it might be missing properly setting the locus. This patch > simply sets the locus of the artificial procedure and its arguments > to that of the derived symbol. This might prevent the ICE, but > lead to a bogus error message. Can you test this? Tested, does not change a thing. The error does not seem to directly have anything to do with the __final_*, but with building the __vtab_* using a structure constructor, which is likely happening at a different place as a = side effect of Paul's finalization improvements. As this seems to be a different (although possibly related) issue, I have created PR112407 for further follow-up and posted my new observations in th= ere.=