From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2E8E93858C5E; Thu, 12 Oct 2023 11:59:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E8E93858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697111947; bh=rdLvQ/e3EHjNtmV+Zwq/drznjUoOjJbPLDM2QldpwR8=; h=From:To:Subject:Date:From; b=CXvsa54TMa8RQusY16jtbbxOC/GKSEeXKcL7shredcvwcqh7U9Q45ZkCietbKHe68 NaWhFXJYS4D1fCItJuavmEYjTFUvQBFN99z81VYdWe+jgR1EeKOlROBZZuUuZA8/BZ kPCKDMAp1rhUmdAoHHsbLAxOBLSKgskHNQxm5UsU= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/111783] New: 'exit' intrinsic should be marked as Date: Thu, 12 Oct 2023 11:59:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D111783 Bug ID: 111783 Summary: 'exit' intrinsic should be marked as Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Target Milestone: --- Compiling testsuite/gfortran.dg/team_number_1.f90 with -O3 produces the following optimized dump: _gfortran_exit_i4 (0); _gfortran_exit_i4 (0); _gfortran_stop_numeric (2, 0); } The last three statements could be removed as the 'EXIT' intrinsic subrouti= ne is known not to return. Thus, we should set ATTR_NORETURN_NOTHROW_LIST (cf. fortran/f95-lang.cc). There are probably more, at least the ABORT intrinsic subroutine and the functions associated with STOP / ERROR STOP like _gfortran_stop_numeric= .=