{"id":2230370,"url":"http://patchwork.ozlabs.org/api/1.1/covers/2230370/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/cover/bmm.hi2c8on426.gcc.gcc-TEST.chris.bazley.151.1.0@forge-stage.sourceware.org/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.1/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<bmm.hi2c8on426.gcc.gcc-TEST.chris.bazley.151.1.0@forge-stage.sourceware.org>","date":"2026-04-29T17:10:13","name":"[v1,0/1] aarch64: Handle opts_set parameter properly in aarch64_option_restore","submitter":{"id":92535,"url":"http://patchwork.ozlabs.org/api/1.1/people/92535/?format=json","name":"Christopher Bazley via Sourceware Forge","email":"forge-bot+chris.bazley@forge-stage.sourceware.org"},"mbox":"http://patchwork.ozlabs.org/project/gcc/cover/bmm.hi2c8on426.gcc.gcc-TEST.chris.bazley.151.1.0@forge-stage.sourceware.org/mbox/","series":[{"id":502114,"url":"http://patchwork.ozlabs.org/api/1.1/series/502114/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=502114","date":"2026-04-29T17:10:13","name":"aarch64: Handle opts_set parameter properly in aarch64_option_restore","version":1,"mbox":"http://patchwork.ozlabs.org/series/502114/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2230370/comments/","headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org; dmarc=none (p=none dis=none)\n header.from=forge-stage.sourceware.org","sourceware.org;\n spf=pass smtp.mailfrom=forge-stage.sourceware.org","server2.sourceware.org;\n arc=none smtp.remote-ip=38.145.34.39"],"Received":["from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5P476gg0z1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 03:12:05 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D38874BB8F6E\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 17:12:02 +0000 (GMT)","from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id 0FA914BB1C27\n for <gcc-patches@gcc.gnu.org>; Wed, 29 Apr 2026 17:11:36 +0000 (GMT)","from forge-stage.sourceware.org (localhost [IPv6:::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)\n (No client certificate requested)\n by forge-stage.sourceware.org (Postfix) with ESMTPS id E2A7C43647\n for <gcc-patches@gcc.gnu.org>; Wed, 29 Apr 2026 17:11:35 +0000 (UTC)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org D38874BB8F6E","OpenDKIM Filter v2.11.0 sourceware.org 0FA914BB1C27"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 0FA914BB1C27","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 0FA914BB1C27","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777482696; cv=none;\n b=RwMybGbMEJDwrj77ZsjO94IPnNlyC88I2rOYuPegDobKvhvRM2PuTcxZFtQ67dbHk4mU8oq+sqjzxnmOy+K/NqDLPFSz3X9asvDgnYZH3vZ9/iRpMBda/+e2zv3RUIh46gn06JeZqRaAHqbuOIFtojp2BvPQiVkielIllQmEBe8=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777482696; c=relaxed/simple;\n bh=rXAjV1ZVOZz5nEcc2a+4snj2OOxD0UhZi/fpnBSh63w=;\n h=From:Date:Subject:To:Message-ID;\n b=F2GCpRV/A3CNLjybgCWlcfeg/u/966h2qhFZi0mcono25Pr7wjcFTaRmma+L4UR2aA5wVgHmX/c3lv8Twxx3Z9RKMYn3Db/a2+TOdV+I6a/WoYtT4GgVnk0jMuDAVW9h7Mjf/tJMFE5Twn7lim8VUi9QR2su6A5NZyv0BuLYdXc=","ARC-Authentication-Results":"i=1; server2.sourceware.org","From":"Christopher Bazley via Sourceware Forge\n <forge-bot+chris.bazley@forge-stage.sourceware.org>","Date":"Wed, 29 Apr 2026 17:10:13 +0000","Subject":"[PATCH v1 0/1] aarch64: Handle opts_set parameter properly in\n aarch64_option_restore","To":"gcc-patches mailing list <gcc-patches@gcc.gnu.org>","Message-ID":"\n <bmm.hi2c8on426.gcc.gcc-TEST.chris.bazley.151.1.0@forge-stage.sourceware.org>","X-Mailer":"batrachomyomachia","X-Pull-Request-Organization":"gcc","X-Pull-Request-Repository":"gcc-TEST","X-Pull-Request":"https://forge.sourceware.org/gcc/gcc-TEST/pulls/151","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>,\n <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>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Reply-To":"gcc-patches mailing list <gcc-patches@gcc.gnu.org>,\n chris.bazley@arm.com","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"Hi gcc-patches mailing list,\nChristopher Bazley via Sourceware Forge <forge-bot+chris.bazley@forge-stage.sourceware.org> has requested that the following forgejo pull request\nbe published on the mailing list.\n\nCreated on: 2026-04-29 17:04:37+00:00\nLatest update: 2026-04-29 17:10:14+00:00\nChanges: 3 changed files, 33 additions, 30 deletions\nHead revision: chris.bazley/gcc ref handle_opts_set_parameter_properly_in_aarch64_option_restore commit 266c39219d59821d57166bd149d3f54048b5cf9c\nBase revision: gcc/gcc-TEST ref trunk commit c392d64098cc675c804ff4f516548d023a4fe29a r17-207-gc392d64098cc67\nMerge base: c392d64098cc675c804ff4f516548d023a4fe29a\nFull diff url: https://forge.sourceware.org/gcc/gcc-TEST/pulls/151.diff\nDiscussion:  https://forge.sourceware.org/gcc/gcc-TEST/pulls/151\nRequested Reviewers:\n\nPreviously, the AArch64 implementation of TARGET_OPTION_RESTORE ignored\nthe opts_set parameter and its callee, aarch64_override_options_internal,\ninvoked SET_OPTION_IF_UNSET with &global_options_set instead of with\nopts_set.\n\nThat was bad for maintainability, because it was based on an assumption\nthat cl_target_option_restore would only be called with &global_options_set.\nOtherwise, if an option were set in *opts_set but not in global_options_set,\nthe corresponding value would have been wrongly overridden; conversely, if\nan option were set in global_options_set but not in *opts_set then its\nvalue would not have been overridden as expected.\n\nIt looks as though cl_target_option_restore is not currently called with\nan argument expression other than &global_options_set except by the arm,\ni386 and s390 backends. However, ascertaining that and ensuring it will\nalways be true wastes more time than simply doing the right thing.\n\ngcc/ChangeLog:\n\n\t* config/aarch64/aarch64-c.cc (aarch64_pragma_target_parse):\n\tPass &global_options_set as an argument to\n\taarch64_override_options_internal.\n\t* config/aarch64/aarch64-protos.h (aarch64_override_options_internal):\n\tAdd parameter declaration for opts_set.\n\t* config/aarch64/aarch64.cc (aarch64_override_options_internal):\n\tAdd parameter declaration for opts_set and pass the argument\n\tthrough to SET_OPTION_IF_UNSET.\n\t(aarch64_override_options): Pass &global_options_set as an argument to\n\taarch64_override_options_internal.\n\t(aarch64_option_restore): As above.\n\t(aarch64_set_current_function): As above.\n\t(aarch64_option_valid_attribute_p): As above.\n\t(aarch64_option_valid_version_attribute_p): As above.\n\n\nChanged files:\n- M: gcc/config/aarch64/aarch64-c.cc\n- M: gcc/config/aarch64/aarch64-protos.h\n- M: gcc/config/aarch64/aarch64.cc\n\n\nChristopher Bazley (1):\n  aarch64: Handle opts_set parameter properly in aarch64_option_restore\n\n gcc/config/aarch64/aarch64-c.cc     |  2 +-\n gcc/config/aarch64/aarch64-protos.h |  3 +-\n gcc/config/aarch64/aarch64.cc       | 58 +++++++++++++++--------------\n 3 files changed, 33 insertions(+), 30 deletions(-)"}