From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A70F9384AB5A; Thu, 16 May 2024 10:17:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A70F9384AB5A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715854652; bh=NMxu2l2ujSc3HA+CBpL332femSUp7uaSatEd/PqXcwY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p0Uul6fKt0GjCseWuypaXFFtqlv4dQKZn3E5rzAvICkNPR3paDEPZ2QISpjiugupz Xo3Ml4HBfCnWY/xuXRBRPIXXnWCVmT/gKdlJIKZVjEV0kOjVmzWxhuT3yfNJYF7XJE zLhfehxyj1OZiNgFgVWRaMYm4V3Aepa/fjia9Yfg= From: "fxcoudert at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/115070] [13/14/15 Regression] ICE using IEEE_ARITHMETIC in a derived type method with class, intent(out) Date: Thu, 16 May 2024 10:17:32 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fxcoudert 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.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D115070 Francois-Xavier Coudert changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fxcoudert at gcc dot gnu.o= rg --- Comment #5 from Francois-Xavier Coudert = --- The only thing IEEE_ARITHMETIC does here is call _gfortran_ieee_procedure_e= ntry / _gfortran_ieee_procedure_exit to save and restore the floating-point stat= e. The middle-end code that errors out is this: /* ??? If this is a local variable, and it has not been seen in any outer BIND_EXPR, then it's probably the result of a duplicate declaration, for which we've already issued an error. It would be really nice if the front end wouldn't leak these at all. Currently the only known culprit is C++ destructors, as seen in g++.old-deja/g++.jason/binding.C. Another possible culpit are size expressions for variably modified types which are lost in the FE or not gimplified correctly. */ if (VAR_P (decl) && !DECL_SEEN_IN_BIND_EXPR_P (decl) && !TREE_STATIC (decl) && !DECL_EXTERNAL (decl) && decl_function_context (decl) =3D=3D current_function_decl) { gcc_assert (seen_error ()); return GS_ERROR; } I don't have a debug build available right now, so I don't know which varia= ble is causing the issue or why. But it seems like a very weird interplay betwe= en IEEE and DT (which are normally completely orthogonal), so maybe we're just catching it "by chance" and the bug is preexisting (but silent).=