Message ID | 20231218163424.1066771-1-quic_apinski@quicinc.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1367525dyi; Mon, 18 Dec 2023 08:35:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEgH6/j8Jkj/1uxhB9Zl/UCS8U+jhX1uV8o5XePjVAWKkCEwWrvQpC2lMjQUoI8vIsfJtI8 X-Received: by 2002:a05:620a:470a:b0:77d:c886:9ec with SMTP id bs10-20020a05620a470a00b0077dc88609ecmr21830101qkb.11.1702917312814; Mon, 18 Dec 2023 08:35:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702917312; cv=pass; d=google.com; s=arc-20160816; b=eEAl+iHuJG/LchPZ0CtDqNcgQh95FtAOzOzRvBHuG9Iams6qWBx5wHojLMtORaZR66 GlW0JXfGrsKN7UCFeroERwGmr1foKwDEqsluMkadzoLZRzxHeJRhjHuMFVeNz4sQM59x sC5fgra1XVJ0NzDFdBjM6LAVGPu/a0wPuxC/KT+fsMMIjZIRFitHCahXzvC9pG8zLrY1 Fxlzk8AHp7/0BLu5SOruTfQf1ULHN0kSsEY1irN+yLmH88uOkJfLOARah6DnRdpbDlHB KRSjZ3dP8g5rhA6sIW0/ClEzrMBOaCi9J3jXJ2qfyHrTU9js5JMR1lwfwuo0hODvDnpU 1WHA== 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:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=RQVA02sn7PIy4dvHbIH+PXbQX1SurnXmyu1rG0ZJxio=; fh=o3CEdS3yGN/eIa89Zn0Kf01WYLxTE9IjKuSQGVPeOHI=; b=HpTKByn4DbjhB2zwJqd89PGyn02W5GZga2faDFDz8tmy/0VbGzZrnieavZDQK2eJAO CJVrzn5R6a0gsJ7OzpMYPI2rKTOgLXprgjWxeTkUHQ3GSo6zjCfJ4zSa63j7xrmzxgaH YkduekUPf9hzZBI2rGwm1y9S/wL+Mlg+Bz1O2+jrwmMjZGHrMcujEqUdRS2TZqRLnG4r menRJHWNq6N3ChUCTFomOWFJ0hflP5zfAQQDJHww+qBEzISGuEnlKf41my23kzeXN9gu dIHAX2ag4/Q982xcz9Tdv842gdhfbFA9C1nrzo4jM5ZYTaYw8UCp7w+moDdncUzTvNCt k8jw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=c2iXZtKv; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id v20-20020a05620a441400b0077f29495173si26163126qkp.371.2023.12.18.08.35.12 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 08:35:12 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=c2iXZtKv; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 882723857B9E for <ouuuleilei@gmail.com>; Mon, 18 Dec 2023 16:35:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by sourceware.org (Postfix) with ESMTPS id 708D93858292 for <gcc-patches@gcc.gnu.org>; Mon, 18 Dec 2023 16:34:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 708D93858292 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=quicinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 708D93858292 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702917290; cv=none; b=XgXEhAyTLe5qD/U0Y2snmvQUeJqFmDL+WpqXjgCbZBKkqnlEffiWfc1T7pLf45F6GFKcB8i2IioZO+nCIeEzrFdHHX5/QAf9AaeXhzmShddUyYNgjokJVKooHfrdouHJ5ZOOBLdVUtUxK8bJQFT/oPyDbw1erSuhf8n7Vjcspn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702917290; c=relaxed/simple; bh=O1XoOTm4c8EHkP6uXMESJWrI9P5UYloLKY8pE1lXBhU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=KukkwMzXPk/FyPG7g0nGxTWhNLnoModWp4YVh8YAKKOMRCtUQnjAbxvmMLU4lf+f16SgfAWrlrUthZZwyqe4M9f5EgVIgt/miHoq002i3+PKEtBVzxNtgWnrXQ9ia7Zmn0jRqHOSgiALgbDe7DQIhUbDyZ0WDwjofYNRSFnFUks= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BIAt98L020633 for <gcc-patches@gcc.gnu.org>; Mon, 18 Dec 2023 16:34:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=RQVA02s n7PIy4dvHbIH+PXbQX1SurnXmyu1rG0ZJxio=; b=c2iXZtKvMHjTQxce4d/ljKc 3xkhNXkKE0HO2yR8gpJxmVZaN3piCmZHfx5XmLDDi5XnBIyd0yI4lXaosIicbVn/ Cpkzf8/2e5Ki8x7Nwr0otwn+DeTHTzTv9qsDQDpmxqP8xkvPWERU+lYQadRUK4+v rTstAN1KyR6nu53RLwCTDi8z9VPPPODxCtsnSb8MfW0cEYJBNcjJky4+Dv+DNJg9 89NeXqKmnFHvQy6VlzdNAKa0YdKVNQQX2DQQPGRnZTcW4Y2UEl2W6g9Ke1RHhLE6 Rh9vJSCZl6liOGp5RBtrtTs6293F23Vtwkkfm0EOED4zyRtiY5DojD6NJfoi78w= = Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3v2gw0sdae-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Mon, 18 Dec 2023 16:34:39 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BIGYc8H026206 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Mon, 18 Dec 2023 16:34:38 GMT Received: from hu-apinski-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Mon, 18 Dec 2023 08:34:38 -0800 From: Andrew Pinski <quic_apinski@quicinc.com> To: <gcc-patches@gcc.gnu.org> CC: Andrew Pinski <quic_apinski@quicinc.com> Subject: [COMMITTED] SCCP: Fix ODR issues when compiling with LTO [PR 113054} Date: Mon, 18 Dec 2023 08:34:24 -0800 Message-ID: <20231218163424.1066771-1-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 6-ELIfio86SjoTkxawH2VIoHJQGYfrBm X-Proofpoint-ORIG-GUID: 6-ELIfio86SjoTkxawH2VIoHJQGYfrBm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 mlxscore=0 adultscore=0 malwarescore=0 suspectscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=939 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312180122 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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: 1785638224014288664 X-GMAIL-MSGID: 1785638224014288664 |
Series |
[COMMITTED] SCCP: Fix ODR issues when compiling with LTO [PR 113054}
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Andrew Pinski (QUIC)
Dec. 18, 2023, 4:34 p.m. UTC
The problem here is that in C++ structs and classes have a
linkage too so the type vertex is not considered local to
the TU but will conflict with the globally defined one
in graphds.h. The simple way to fix this is to wrap the ones
defined locally in gimple-ssa-sccopy.cc inside an anonymous namespace
and they are now considered locally to that TU.
Committed as obvious after a bootstrap/test on x86_64.
gcc/ChangeLog:
PR tree-optimization/113054
* gimple-ssa-sccopy.cc: Wrap the local types
with an anonymous namespace.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
---
gcc/gimple-ssa-sccopy.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/gimple-ssa-sccopy.cc b/gcc/gimple-ssa-sccopy.cc index 7ebb6c05caf..19a656e2822 100644 --- a/gcc/gimple-ssa-sccopy.cc +++ b/gcc/gimple-ssa-sccopy.cc @@ -95,6 +95,7 @@ along with GCC; see the file COPYING3. If not see /* Bitmap tracking statements which were propagated to be removed at the end of the pass. */ +namespace { static bitmap dead_stmts; /* State of vertex during SCC discovery. @@ -334,6 +335,8 @@ scc_discovery::compute_sccs (vec<gimple *> &stmts) return sccs; } +} // anon namespace + /* Could this statement potentially be a copy statement? This pass only considers statements for which this function returns 'true'.