Message ID | 6544edb1.c80a0220.1973f.13e3SMTPIN_ADDED_BROKEN@mx.google.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1006024vqu; Fri, 3 Nov 2023 05:55:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG67z6p5YevAH10FxpRy37WUkMzAf2NNCWZ5kOA/5fuvLUgybroY1MNK9zEh4COSLvXpne2 X-Received: by 2002:ac8:580f:0:b0:418:1f3c:5120 with SMTP id g15-20020ac8580f000000b004181f3c5120mr23781240qtg.46.1699016113533; Fri, 03 Nov 2023 05:55:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1699016113; cv=pass; d=google.com; s=arc-20160816; b=VMo6reiH4wtdh92IzQTMahBpCXKRwjRNw2rNPiWsgIGaWGJ7UNN2v6nNXflQrkyqnQ J3UsLu3cGIevJmFHbM19ZdJ9LuYcPkPDcx5/PPD3/a8lXVN9qW9Wt7jIE7w173ewPLo1 gmOZCndlcOnMZch5r44lXD1cpY3PCUFXvDpdHWR+7i6wVLrnfTmXl0DwEUvvaDDlTsM2 DxqWWObmn9wWzhAaD1IB2w7Eg3Albp6kEiXow8I24F9KZDWQAXjqU8u1IDFwvVTUI4AP dKnQ9JDY0lH809z0HNWbgfyyYU024IwTHlNGD7ABIJu5fiQp/ibz6oa3H0hXjSGXx3S9 D/9A== 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:mime-version:date:user-agent :subject:cc:to:from:dkim-signature:dkim-signature:arc-filter :dmarc-filter:delivered-to:message-id; bh=f1RlveB4Qurdb7Cb+xX7VLfKcLFuSLOOVnOuBbE8avo=; fh=RiDEwLO2qIbU4NZTPTPFHafM/XSwMKKoR8IH2WFeCbQ=; b=bOsKqJtjQGDWdM0vDSLfYKuSdyqpNI72CLTijyPd8iLFMmWPuc+PUIwDVQcPk5Mtc0 zvkzWGR8KEaXRkEdbGf8ECCYaFZa4bXt9BVpkgnVe31lCBF2a/q3qWKShdyKqxuj2K7c RvdIGFKa0xSJTftxYJ13NJSptL46lSeQl0cQLHO6JXefykT1RpqCf8BJZ3AGNqUq6ANs FJNYWsAvDAcS4UBMrYgjxfQZpqLzFdbA/gO4Tj4AOZQHePJodLwjiqRSy7G6rCgkb7X4 CR4xYNp1Kj0RO/IRxbiPCZN644kqoY4lxnbe6d+B3DTXiwPDPHIoGTt3992FmyqkT31M rA0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="WAv/P3J7"; dkim=neutral (no key) header.i=@suse.cz header.b=YfKWgLz4; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id b7-20020ac85bc7000000b0041020b894b6si1516823qtb.101.2023.11.03.05.55.13 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 05:55:13 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="WAv/P3J7"; dkim=neutral (no key) header.i=@suse.cz header.b=YfKWgLz4; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Message-ID: <6544edb1.c80a0220.1973f.13e3SMTPIN_ADDED_BROKEN@mx.google.com> X-Google-Original-Message-ID: <ri6o7gb0zg6.fsf@> Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4234C3858024 for <ouuuleilei@gmail.com>; Fri, 3 Nov 2023 12:55:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 387DF3858D28; Fri, 3 Nov 2023 12:54:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 387DF3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 387DF3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.220.29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699016090; cv=none; b=wB8gHOpQDq1AqB8iqqzRkn1Mt3CQoimYp1IN3ADxG40TTd6oyXFPnEdnbx/mNTmYTUArNRQFCVz364Jwt9xbDYXkTZPhK0jLZT/jlQfpDGypbOjH+rBFq+Jf6dXFd2hmw3IVG8PCVvz/tWSzWca0+Bg98R7YUQG8bTHiSdxyHIg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699016090; c=relaxed/simple; bh=9auWcZ01t7Lfcz/KbOyq/FfHhswNGPA4RIvfjg7mw9Q=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=l15lDi7a/b8OMh2W/JN46uVXYetUwvXhOXWWdlb/qs4uPpZrJQhJGUUNXkOXqMX19BRM/yo5wbgaSACc4kJdzScdracQ7rhqTN7rKJYymBbDeqxJXzPcp4DnERPZy8onoW9UyOlVv/1VGzp7krASia1DjXuj5GS5VztLjnMJO3U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 50DC71F890; Fri, 3 Nov 2023 12:54:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1699016079; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=f1RlveB4Qurdb7Cb+xX7VLfKcLFuSLOOVnOuBbE8avo=; b=WAv/P3J7zvcaWL4Z9LJF1bCMgPCDkArCeqtXcc9T0pFcrWg/PoUk4wI1jPR9knd0Uo9fqp VszRnVxFQjiqRVBVVOK9V47RJ8w1FrcD2haD/IEmZUBcxQtzASjVqB7AmwndKObKpP45KA XP7FyasqSKHFCCymq0EZZok+hSwMFIA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1699016079; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=f1RlveB4Qurdb7Cb+xX7VLfKcLFuSLOOVnOuBbE8avo=; b=YfKWgLz4vcxmFq/RSj8hbcWEmycFa56dfeLruXTc4+cwYPZiDhI/xwmfb1YKPh42Dq2pH5 NA4TcaLJOBstQhBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3EF071348C; Fri, 3 Nov 2023 12:54:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id PynZDo/tRGVIZAAAMHmgww (envelope-from <mjambor@suse.cz>); Fri, 03 Nov 2023 12:54:39 +0000 From: Martin Jambor <mjambor@suse.cz> To: GCC Patches <gcc-patches@gcc.gnu.org> Cc: fortran@gcc.gnu.org Subject: [PATCH] Fortran: Fix generate_error library function fnspec User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/29.1 (x86_64-suse-linux-gnu) Date: Fri, 03 Nov 2023 13:54:33 +0100 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, INVALID_MSGID, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781547520199762404 X-GMAIL-MSGID: 1781547520199762404 |
Series |
Fortran: Fix generate_error library function fnspec
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Martin Jambor
Nov. 3, 2023, 12:54 p.m. UTC
Hi, when developing an otherwise unrelated patch I've discovered that the fnspec for the Fortran library function generate_error is wrong. It is currently ". R . R " where the first R describes the first parameter and means that it "is only read and does not escape." The function itself, however, with signature: bool generate_error_common (st_parameter_common *cmp, int family, const char *message) contains the following: /* Report status back to the compiler. */ cmp->flags &= ~IOPARM_LIBRETURN_MASK; which does not correspond to the fnspec and breaks testcase gfortran.dg/large_unit_2.f90 when my patch is applied, since it tries to re-use the flags from before the call. This patch replaces the "R" with "W" which stands for "specifies that the memory pointed to by the parameter does not escape." Bootstrapped and tested on x86_64-linux. OK for master? 2023-11-02 Martin Jambor <mjambor@suse.cz> * trans-decl.cc (gfc_build_builtin_function_decls): Fix fnspec of generate_error. --- gcc/fortran/trans-decl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc index a3f037bd07b..b86cfec7d49 100644 --- a/gcc/fortran/trans-decl.cc +++ b/gcc/fortran/trans-decl.cc @@ -3821,7 +3821,7 @@ gfc_build_builtin_function_decls (void) void_type_node, -2, pchar_type_node, pchar_type_node); gfor_fndecl_generate_error = gfc_build_library_function_decl_with_spec ( - get_identifier (PREFIX("generate_error")), ". R . R ", + get_identifier (PREFIX("generate_error")), ". W . R ", void_type_node, 3, pvoid_type_node, integer_type_node, pchar_type_node);