From patchwork Mon Oct 16 17:11:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 153695 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3606525vqb; Mon, 16 Oct 2023 10:12:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGg3xNhYSrFIuBW+kPkoMMXrSV9bbPuskth9nbFdNE36c6biU0g/CWxYSX7c0gZX4auZWuT X-Received: by 2002:ac8:5715:0:b0:418:804:3406 with SMTP id 21-20020ac85715000000b0041808043406mr45578803qtw.39.1697476343828; Mon, 16 Oct 2023 10:12:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697476343; cv=pass; d=google.com; s=arc-20160816; b=lJ6kJbpnkiNAFcKK12Y8oCLhWOEwYly7NoKVboC3nnJlAWXIY3bbGhqKUGGCwIufis KfJH2gEzWFzWMLVyDO+V3IbHxG4Ujl/chD2hR3SDJy8Hizi1wKhuG5t628rzbpV6GLKy ujMKPJuWKnPgIwTSWYNx8id8lj5R/uLjvOdmqo8Fyen/7V6G2g6B/Gkpl5s4lbYP2VdP qSOFBZE53al464qVXxEG6Gm2UTeoKNdlplR9h7BIleCK5M7wfL4LHLVVFBrazIpAtJZA f+wwzPLIr1UCfXIR2mLB2Nm2O/+XeworA2kNJQ75EwPND5CGxo2VI4lHBix7I7B7mYI0 qx4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:from:to :content-language:user-agent:mime-version:date:message-id :ironport-sdr:arc-filter:dmarc-filter:delivered-to; bh=rYFwcgjPx65ZqzPAfydqD9OKoIAXC16v7udEjdA/WUc=; fh=ARF5Mvhgv4mOzEi1LJHgn82UOzar4LOruqM9inFDcVw=; b=d56ZdQ+d7GAWVuWEk5Rr0k39+HIBmGG9kSqnSEdxqasniki93cadjT8QQUNGJc2wIx 8ha5hjjUZgw+HiIDtyRzmlw5UnheiH2tH0ovLGo0/rUSFoFQZmpwjmdCFkytcfzp1GAK BJSnWkMrjaLaXh7wShxeyZ0NBDdbiPvONphMZjPvscoWE/FJynzHYDC/aFL0uJmc/Vez k2igAfpF2Rz0Xbd82UqiePL0mdcs/mvKYgcuoVcCTY2WxnNgGKrKAWmlLOQJf+EmLELG utZi8nYACjU6MrGQ5bal0Zv96vsuoz6jYXr3KGbxyBmP7ok6uUshR85hYVcSTmRKQyrz RTsw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s9-20020a05622a178900b00403c7a46698si5749409qtk.440.2023.10.16.10.12.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 10:12:23 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 95D31385C6F2 for ; Mon, 16 Oct 2023 17:12:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id EF1D5385B516; Mon, 16 Oct 2023 17:11:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EF1D5385B516 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EF1D5385B516 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.252 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697476319; cv=none; b=h6bM3b87B0BrTQu5ba+yziyenAsQt0oC5lD/Hc6lJhrUYcjLuOLTT/ykWlsZd1v2AT0RCohGs1tmwCLxv0E7eszDdygkDXTY0ABocnvRbNE5K1/G3YvtoVGnirwd7vt1xScCUq6NJp/p/NeAohCw/mwOF7ye8XGoFGDFxjNT49M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697476319; c=relaxed/simple; bh=rYFwcgjPx65ZqzPAfydqD9OKoIAXC16v7udEjdA/WUc=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=E1hWSPnK6T72ZV/GtPcP7DANBnrMQTfxWNJTIaJ4J3LhxUsvXi2f2TJofxYXBp6gVn2IpjGsDAoiafVc7Kl1cKYOn38XQrMWaoJpN7WcTBddCGMjbkVmtO33gWf+/4/cw3W42+0+Kal7cv2mTKAAiTXjSvgK+n6/uM1AVDcsGoM= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: 7yvgygGvQkyG0XnFlQ1jxw== X-CSE-MsgGUID: w0lBBmQRRfajXlhnk8USPQ== X-IronPort-AV: E=Sophos;i="6.03,229,1694764800"; d="diff'?scan'208";a="19736517" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 16 Oct 2023 09:11:51 -0800 IronPort-SDR: dW1Y9L9akf+umWA/iBUsAiCmM3s6CVuTGMuYfV1VJDLlaOeKsJY0rGg6Nbhd7rrxSeD4t+I0Tx aXnSrMU9H2Fqbh8z+xEkt0DA8q9+N9X5WsDWHMsKwNPmuvqk3H+t701Hm5YMcIWFkBQ6oz6tvs cabikKEnQvsFMj5mnpe43wn14akToEzcENfH7cleYcxP4dPz7LIXmzrkzN1nfPCHDcf5Yh63kP 1+ftkoRQW/tPeRSLngW5jC1y8NLvOGu1X49QqvKZhwDZrKm+Ld512uLfAqmJzBZOsWPOOofXoc 0cM= Message-ID: Date: Mon, 16 Oct 2023 19:11:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: gcc-patches , fortran From: Tobias Burnus Subject: [patch] fortran/intrinsic.texi: Add 'passed by value' to signal handler X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779932954809822842 X-GMAIL-MSGID: 1779932954809822842 Yesterday, someone was confused because the signal handler did not work. It turned out that the created Fortran procedure used as handler used pass by reference - and 'signal' passed the it by value. This patch adds the 'passed by value' to the wording: "@var{HANDLER} to be executed with a single integer argument passed by value" OK for mainline? Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 fortran/intrinsic.texi: Add 'passed by value' to signal handler gcc/fortran/ChangeLog: * intrinsic.texi (signal): Mention that the argument passed to the signal handler procedure is passed by reference. diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index 6c7ad03a02c..3620209e00a 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -13168,10 +13168,10 @@ end program test_sign @table @asis @item @emph{Description}: @code{SIGNAL(NUMBER, HANDLER [, STATUS])} causes external subroutine -@var{HANDLER} to be executed with a single integer argument when signal -@var{NUMBER} occurs. If @var{HANDLER} is an integer, it can be used to -turn off handling of signal @var{NUMBER} or revert to its default -action. See @code{signal(2)}. +@var{HANDLER} to be executed with a single integer argument passed by +value when signal @var{NUMBER} occurs. If @var{HANDLER} is an integer, +it can be used to turn off handling of signal @var{NUMBER} or revert to +its default action. See @code{signal(2)}. If @code{SIGNAL} is called as a subroutine and the @var{STATUS} argument is supplied, it is set to the value returned by @code{signal(2)}.