From patchwork Fri Jul 19 15:09:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 1962529 Return-Path: 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=ElEJUTx1; 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 4WQY4S5DWwz1ySl for ; Sat, 20 Jul 2024 01:09:42 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 89082386075A for ; Fri, 19 Jul 2024 15:09:40 +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.133.124]) by sourceware.org (Postfix) with ESMTPS id 0CBC2385E45E for ; Fri, 19 Jul 2024 15:09:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0CBC2385E45E 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 0CBC2385E45E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721401761; cv=none; b=xpSpos8qECroUpeg9aHpqAaqsLsnIbSX75iPne8Me9gl8Z7ENQCh5d3QNy2Y9USEyqdyM7hO/VLQi2xKXrby68NXBjW09Qm+XAjMxCHIZVEXO988UkWs7ioBX2wuJOpvPZ32GkTkWJaaymuRm3nH/BRxivmJ0SDcoaVU18XW544= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721401761; c=relaxed/simple; bh=ndrNPIPN+5NQyO1NR3k9vssD/ZgVd9wG61PshN5q0yU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bT2uz9VUUJBGA4e6p0tuW2fSd21oXidl64t0gLoTesGvWUcuTuKzTnnxI3fcslZbyNNCCc5XL82e6EK0Qq2QsqytVj9wSEDsAss9aMrTsiRkCutJOWnEfQN7QNgLv1aEW5qTq6ao5XX3XrDI97R7FV/229d6KlnZposJc6ZKSw8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721401750; 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: content-transfer-encoding:content-transfer-encoding; bh=ZRdcfyYScI7+B7sy0Wr9DP/HwLjzguMr3f7yjSYcgHY=; b=ElEJUTx1TV6bDhjaSFt98FFTRB9c16YgtdAXfIcvm/p7Zd9dEc+X4GGD1AWWzRbR1etL2A bkgiuyA3IOtKlZlwlib3lCin12oisPFzC9NgJ8kjr4e5nDg6fYrFHEaj5g1mke9mrpW9uI min53hc1S4FQwm9mmfvzNXkxtbEKXD0= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-16-MNyy90wMP_2ybjnm4WuucQ-1; Fri, 19 Jul 2024 11:09:08 -0400 X-MC-Unique: MNyy90wMP_2ybjnm4WuucQ-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7a198574922so125647885a.3 for ; Fri, 19 Jul 2024 08:09:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721401747; x=1722006547; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZRdcfyYScI7+B7sy0Wr9DP/HwLjzguMr3f7yjSYcgHY=; b=J3Pu4s2HLbaLw5GSVz49sLwm3gewi3z7QzIK4DsyM/z/aPohQOra+TshcZ7zCaR6S7 Qb0PTW3C071XxgkSXTG3P4o7xfWg346a8VVaBkzD515A8On9ffoROp8XGeGiHkCSPI6q TT7jLDfaBz9aApC/pEmv6P0QWUEYpxJaJDzZ8qEkJjzMWKYv4M2fzc2qqG+yc/mYiQHc oJKlY8cYy8wVDjDhH8ysrj0I9Cfv69rD8YCZjVxaCvt0QDOMTs/6a+38bIqdRz7dyV3T t6mBXjwyUUxbYEHymtGPglQ8J9kzuKBg4iJX57QwSaBxiecwCS9yDBzkwrpW5cE1uhYa HO1A== X-Gm-Message-State: AOJu0YxNCCFHksll4R5btV4f6q30ys0Ket8mj/UFS6D/gmA8MNNmxcsA R/V2E2wZ7bXneFqqXzH6+h78PJbBT0o+ENPp+6iisVTj9NjXC3H7ZaywyVhN/v8H8SZQruPQ/Mj i1B20XUHI24OD9RF9iwhZFmmhTqpFfPigwnTADR3UylQE06U40RP/V2l3xSGSEcONyvEU8HCfrW A9KDdUjxXKXJBq2A/kLwQk0zx6XcUXbOAAkkQ7 X-Received: by 2002:a05:620a:4144:b0:79f:433:6e7f with SMTP id af79cd13be357-7a1a132c756mr19358085a.21.1721401746567; Fri, 19 Jul 2024 08:09:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwEa3vlfML71qC+PZXcLEob0Svo1tO2zGZ5PfyZpyzJ305+OQVawhaCi8Ssm2tJXVcatBwBA== X-Received: by 2002:a05:620a:4144:b0:79f:433:6e7f with SMTP id af79cd13be357-7a1a132c756mr19354485a.21.1721401746156; Fri, 19 Jul 2024 08:09:06 -0700 (PDT) Received: from localhost.localdomain (ool-18bb2a2e.dyn.optonline.net. [24.187.42.46]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a19905a991sm92246185a.86.2024.07.19.08.09.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jul 2024 08:09:05 -0700 (PDT) From: Patrick Palka To: gcc-patches@gcc.gnu.org Cc: jason@redhat.com, Patrick Palka Subject: [pushed] c++: add fixed testcase [PR109464] Date: Fri, 19 Jul 2024 11:09:04 -0400 Message-ID: <20240719150904.2079000-1-ppalka@redhat.com> X-Mailer: git-send-email 2.46.0.rc0.106.g1c4a234a1c MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.4 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, SPF_HELO_NONE, SPF_NONE, 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~incoming=patchwork.ozlabs.org@gcc.gnu.org Seems to be fixed by r15-521-g6ad7ca1bb90573. PR c++/109464 gcc/testsuite/ChangeLog: * g++.dg/template/explicit-instantiation8.C: New test. --- .../g++.dg/template/explicit-instantiation8.C | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/explicit-instantiation8.C diff --git a/gcc/testsuite/g++.dg/template/explicit-instantiation8.C b/gcc/testsuite/g++.dg/template/explicit-instantiation8.C new file mode 100644 index 00000000000..92152a2992e --- /dev/null +++ b/gcc/testsuite/g++.dg/template/explicit-instantiation8.C @@ -0,0 +1,24 @@ +// PR c++/109464 +// { dg-do compile { target c++11 } } + +template +struct shallow + { + int len; + constexpr shallow() : len(0) { } + }; + +template +struct use_shallow + { + static constexpr shallow s_zstr = { }; + static_assert(s_zstr.len == 0, ""); + }; + +extern template struct shallow; +extern template struct use_shallow; + +template struct shallow; +template struct use_shallow; + +// { dg-final { scan-assembler "_ZN7shallowIcEC2Ev" } }