From patchwork Sun Jun 9 23:37:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 1112770 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-502664-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Xw8R+TmM"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45MXkm0vg5z9s4V for ; Mon, 10 Jun 2019 09:38:03 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=gQKvI6HX6GA0DY78 1mDuBcY/t1mfffmBKS6Ml7t6PZUfrfSSbG+OE0pW1tVagAMePDzAR7icWmiWTQOc DapqTyv1yRget2SwHp/xo8QltyZOwyrBmZ5ZctyQP8t0TFE6DULMuTMLavOcMNOq 3NDWj8tTcDWx/sp+ogEcnVguxdY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=Y6EIkf3+MtwbSodtpfXNrL q2/LE=; b=Xw8R+TmMupQc6gvDSPlJvHeZioU8vlLqvjRz9yLFcpPH2hjcnXYOvD ym419Jjz5rqTaJvU7UMTfuTeE6rpW8/M29SyH6fwpFHSNQNPGRCxpkjqJfd0x+rd X1wug2msmO+KOUHpDm8/PrhxhvguIUYDZ7ItCHvuwJmeziyCToYw0= Received: (qmail 55674 invoked by alias); 9 Jun 2019 23:37:55 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 55666 invoked by uid 89); 9 Jun 2019 23:37:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 09 Jun 2019 23:37:54 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 648C23082DCE for ; Sun, 9 Jun 2019 23:37:52 +0000 (UTC) Received: from redhat.com (ovpn-120-57.rdu2.redhat.com [10.10.120.57]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D2FCB5C28D; Sun, 9 Jun 2019 23:37:51 +0000 (UTC) Date: Sun, 9 Jun 2019 19:37:49 -0400 From: Marek Polacek To: GCC Patches , Jonathan Wakely , Jason Merrill Subject: [C++ PATCH] Add test for c++/67533 (or not?) Message-ID: <20190609233749.GB5989@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.11.4 (2019-03-13) This testcase used to ICE but was fixed by r259067. We now issue 67533.C:5:26: error: conversion from ‘void’ to non-scalar type ‘Tls’ requested 5 | thread_local Tls mytls = mytls; // { dg-error "" } | ^~~~~ whereas clang++ and icc compile it. However, the test uses a reserved identifier ([lex.name]/3), and I think the error is fine. Do you think it's worth adding this test? I thought so, just to check we don't ICE, but who uses a mangled name as an identifier?! Tested x86_64-linux, ok for trunk? 2019-06-09 Marek Polacek PR c++/67533 * g++.dg/tls/thread_local-ice5.C: New test. diff --git gcc/testsuite/g++.dg/tls/thread_local-ice5.C gcc/testsuite/g++.dg/tls/thread_local-ice5.C new file mode 100644 index 00000000000..4147c322e7b --- /dev/null +++ gcc/testsuite/g++.dg/tls/thread_local-ice5.C @@ -0,0 +1,7 @@ +// PR c++/67533 +// { dg-do compile { target c++11 } } +// { dg-require-effective-target tls } + +struct Tls {}; +void _ZTW5mytls(); +thread_local Tls mytls = mytls; // { dg-error "" }