Message ID | 2c3536c9-623a-8e02-45ea-8aaddb4ff5f5@idea |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QtFKYM0L; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T5btg21rpz1yQ5 for <incoming@patchwork.ozlabs.org>; Fri, 5 Jan 2024 06:16:59 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 24E693858431 for <incoming@patchwork.ozlabs.org>; Thu, 4 Jan 2024 19:16:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id C1BA53858D32 for <gcc-patches@gcc.gnu.org>; Thu, 4 Jan 2024 19:16:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C1BA53858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C1BA53858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704395793; cv=none; b=Q2RbZqfaSe0njYMqFJ63EEqZWMX97o0NecTHDPA/kuiaFNU3KdIcqH7pAxZNooNlANhkZyOAxLkNeLj/kkQU3BPpVZv3Ets7DRA11Bty5+EDOqe3Bq3oTqEVebVdyazxG4cjR5/h8Tc+6yhYSbke7lFUiOHv1kv+nj6FmK7pU0U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704395793; c=relaxed/simple; bh=/S3EOrckSg30xPkgGQ51i1Bf91lgLkNtbw8AkIWtJxk=; h=DKIM-Signature:From:Date:To:Subject:Message-ID:MIME-Version; b=IvMjKW8tH75NhPn/T3bWcH2YAUNTWb/8ATGREznw5p85+oEaiFw35NA69qeRpP2x+FXLxVpligI4GPR6NYTnE0OGrZ1e6VN7qsjq5pz9sSY/k7nYoHfFnheEa62+GPTJRFStOe676BPwqO9xNmclbfruEcpivlZz4JmHQhWps2Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704395791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=V1qHs9xwfS8p+dWZR0K0Q0Eb4VjoNLL2IomnnSrVXeM=; b=QtFKYM0LJGEh6YN6OdUIDNyuudkWrxilfROFtvqV9cfYQ15UIb8lNz4MgGLTpbmTsLP5rn W2EJwezGhS7dZufA3HQjIALovJ2S2FRI+JzQBB2IygIjpQpc5XmZmVZthkJI77G99Yp3Vu Y+SfExnzgrimiDehG/rj6MLNwERZ1U0= Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-639--U-7Fp1xNX2cG7yXWZde8A-1; Thu, 04 Jan 2024 14:16:29 -0500 X-MC-Unique: -U-7Fp1xNX2cG7yXWZde8A-1 Received: by mail-ot1-f72.google.com with SMTP id 46e09a7af769-6dc20b43230so936991a34.0 for <gcc-patches@gcc.gnu.org>; Thu, 04 Jan 2024 11:16:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704395788; x=1705000588; h=mime-version:references:message-id:in-reply-to:subject:cc:to:date :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=V1qHs9xwfS8p+dWZR0K0Q0Eb4VjoNLL2IomnnSrVXeM=; b=WxrEcokk/j8c4sAOdGyjBsUdre8ak8DSQIgUf8zJa50PtTZ7Nqie46LabpcuymzIUe s3joD22fmpLjbAbjb16o7SuZiQZE1SEkKGdq8tvyCJx6aIITNg2RzGnuG1AiZbDewfmz HZuSmfr9T2OkGmko6meZjF3DiBu7xeQPrrw9rK5+ui+Wpf7kEk5PKH5sZexMWZC86wro H3I5wIvnOHRXFOnDgLADQfjHxW6h8iOhncvzdGEPtAlpkxc68UXBQ/BVoAr/GJMBzxZc 0DghzRz85Y5eiuPhIYq4sOV8mrbo0wJOYjAAOvEe3UjBWIOGv/fYBYYtGw6fCNEf78YL MZcQ== X-Gm-Message-State: AOJu0YwBWF9gyPV1NrYUm+UvuH12LKSXIuFe5ug5BZ9cLFxR7gHlGD9r wfd4Y0ru+uONewaglNUglMEexF+bBBMzZ7z8A/dPIobKzcd5kxKxBeUAUpVPn7ZqIK0l/EukQ5F xqrBROkUhaKZHTlKKflXeXWHVpQ== X-Received: by 2002:a05:6870:898b:b0:1fa:ea74:ddc9 with SMTP id f11-20020a056870898b00b001faea74ddc9mr1128365oaq.10.1704395788601; Thu, 04 Jan 2024 11:16:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IF12f9Ux4qgb1ywRzxJ9s0Usb1oV23uyVCemT1Xt4xJFO3FXbMMBW5f0dIMzd/2CmL8Nrr2VQ== X-Received: by 2002:a05:6870:898b:b0:1fa:ea74:ddc9 with SMTP id f11-20020a056870898b00b001faea74ddc9mr1128357oaq.10.1704395788370; Thu, 04 Jan 2024 11:16:28 -0800 (PST) Received: from [192.168.1.130] (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id r15-20020a05620a03cf00b0077f289b92c6sm21698qkm.123.2024.01.04.11.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 11:16:28 -0800 (PST) From: Patrick Palka <ppalka@redhat.com> X-Google-Original-From: Patrick Palka <patrick@idea> Date: Thu, 4 Jan 2024 14:16:27 -0500 (EST) To: Nathaniel Shead <nathanieloshead@gmail.com> cc: gcc-patches@gcc.gnu.org, Jason Merrill <jason@redhat.com>, Nathan Sidwell <nathan@acm.org>, Patrick Palka <ppalka@redhat.com> Subject: :Re: [PATCH v2] c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899] In-Reply-To: <65955649.170a0220.e1f37.25c3@mx.google.com> Message-ID: <2c3536c9-623a-8e02-45ea-8aaddb4ff5f5@idea> References: <659490fd.170a0220.1ce2e.503a@mx.google.com> <65949213.a70a0220.2947.d85b@mx.google.com> <65955649.170a0220.e1f37.25c3@mx.google.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_WEB, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, URIBL_BLACK 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+incoming=patchwork.ozlabs.org@gcc.gnu.org |
Series |
:Re: [PATCH v2] c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]
|
expand
|
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index 154ac76cb65..25921c97ffe 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -27155,7 +27155,12 @@ instantiate_decl (tree d, bool defer_ok, bool expl_inst_class_mem_p) { set_instantiating_module (d); if (variable_template_p (gen_tmpl)) - note_variable_template_instantiation (d); + { + if (DECL_CLASS_SCOPE_P (gen_tmpl)) + note_static_data_member (d); + else + vec_safe_push (static_decls, d); + } instantiate_body (td, args, d, false); }