From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 710153858D20; Thu, 13 Apr 2023 19:44:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 710153858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681415076; bh=d7NDoXMF8Dx2XB6LkKXuX3QWY2V1tguzBLndQAOj3P0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CcNTshzoF+99L4mEdfSkMraYvNTclEDr2aOHvEDFBUMHhB01lK3P8iiL4bDMRRDGc t9zsW3Yd/Amxv0BE+7kblWNlA+DBLZ12yzseAeBuP/Zyf6HVzxQFphpfk79WESGpxu dEs46JyQ+s9wsc8V4fwBxW8wyqx6UUgZbytmVyCs= From: "leandro.lupori at linaro dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/109500] SIGABRT when calling a function that returns an unallocated value Date: Thu, 13 Apr 2023 19:44:36 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: leandro.lupori at linaro dot 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: 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=3D109500 --- Comment #5 from Leandro Lupori --- Ok, thanks for the detailed explanations. Now I see that the standard doesn= 't allow the return of an unallocated value. This can be closed as invalid. But may I just ask a last related question? As mentioned in the last comment and according to Note 1 in F2018 8.5.3 ALLOCATABLE attribute, the result of referencing a function cannot be used as an allocatable argument. This is however allowed by gfortran (and ifort), with the exception of intrinsic procedures, and seems to work correctly. Should this be considered an exten= sion or does it just work by accident and there are no guarantees at all when us= ing it?=