Message ID | 1632855067-7525-1-git-send-email-indu.bhagat@oracle.com |
---|---|
State | Committed |
Commit | ae2df1a347fad44fa70990311ca981698487b780 |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F1BE13858436 for <patchwork@sourceware.org>; Tue, 28 Sep 2021 18:52:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1BE13858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1632855122; bh=flkR3+DDHnZJIqlFRgDnOfpInSANrQBiJn0/f8VaBx8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=CUROqrgCMIWNV+SrE+rvQzEasltJch9DO+g3PkCTy38L5+6gGKiAZiGjCLscRKzX9 aS4N9mLt38L0/fvpIZT8M3LIoJjtWLvJeJvwxnBKUpu0XjI1m0gSLHpztgz2RZy2p6 UXvx311CEOHbsrenONyPt/gqZ5omnRRu9Xd7nHXk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 696943858D39 for <gcc-patches@gcc.gnu.org>; Tue, 28 Sep 2021 18:51:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 696943858D39 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18SIR4L5007082 for <gcc-patches@gcc.gnu.org>; Tue, 28 Sep 2021 18:51:31 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3bbeu1afu8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <gcc-patches@gcc.gnu.org>; Tue, 28 Sep 2021 18:51:29 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 18SIo93e125793 for <gcc-patches@gcc.gnu.org>; Tue, 28 Sep 2021 18:51:14 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by userp3020.oracle.com with ESMTP id 3bc3cd1kq2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <gcc-patches@gcc.gnu.org>; Tue, 28 Sep 2021 18:51:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cDItJSjpRQ+jJ6jCTlcqW/VncIZxBy28HyFadwcXyXy4tdwUi2bMLJ3g+L5v3HDvRIP/JePlc/J6OMTbrapAyQ69UWrusg6E15RvluG8beQe7EviU6lhb4hEuUFfY7M5x/SQic06JsyfJI/IBL7mAWOtzEUVpR/RD8qXBDrL+ICzjz6FIaEBQA8Hdqve+TmQUkBmSfPAk8rxgi1G0/eqwRdYCh1I0cYOJlza7Z12va9E/KQzJS6xaR5hgXooMAp+my6ACerqzYRcjj2XR+p7cnIaqPQq6yUhu9QJ0kmAw5o01jRPE95W8u3m6U9uF1+iNbjiGeU2vUYpsnH76mAz6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=flkR3+DDHnZJIqlFRgDnOfpInSANrQBiJn0/f8VaBx8=; b=fT6dW8BaKINIYzl9qEmb1sIAvJdSAsXixaaEvqdvpn8eoT0YVFq71Wl0iC1S+pCXhzCZ+HNW9xrJ4kWRsDqV7zhWsZxPXGJPNpbfzBWnWqKVKFcgis4k+gBJ1YuhvyN5XGvm4TlDElnRfI45EhuTNrnzAAy2pksJDGm4d0FUcGOFeAWzFFESsGsgL/+Jpk6ICtfrSGJQY0nUAEE3KDCiSR3fj3Lkv7HC/UEPwCUvJlg9BZvIQ1lnhbdWYOkd/Ekb7bgVyN92aSNCi1zdYMZVfyceMGHhwBptzTbOQpqw6fbd/ksv4AuBWrwAPV7HOixFkrqZLglAi3hmlSgCt5vk7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by MWHPR10MB1661.namprd10.prod.outlook.com (2603:10b6:301:8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.18; Tue, 28 Sep 2021 18:51:11 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::1180:46c:d426:11b9]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::1180:46c:d426:11b9%6]) with mapi id 15.20.4523.025; Tue, 28 Sep 2021 18:51:11 +0000 To: gcc-patches@gcc.gnu.org Subject: [PATCH] ctf: Do not warn for CTF not supported for GNU GIMPLE Date: Tue, 28 Sep 2021 11:51:07 -0700 Message-Id: <1632855067-7525-1-git-send-email-indu.bhagat@oracle.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MW4PR03CA0244.namprd03.prod.outlook.com (2603:10b6:303:b4::9) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 Received: from ibhagatpc.hitronhub.home (24.80.24.133) by MW4PR03CA0244.namprd03.prod.outlook.com (2603:10b6:303:b4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Tue, 28 Sep 2021 18:51:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d64d1a89-740c-4696-de26-08d982b0f0d0 X-MS-TrafficTypeDiagnostic: MWHPR10MB1661: X-Microsoft-Antispam-PRVS: <MWHPR10MB1661C412BEBE4D773A2F5CCF82A89@MWHPR10MB1661.namprd10.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:459; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VENOWHR8fzjhu9Fgs6TPgZ71F8hy4odMaWOzGZBIa9IPqAFxoWCCNiN+b8lhg3GHxjtpMGtTGYX3IYzu9g80lXGrFi1EbM7uhLah//ILTRCJXHx2M96OAnKKgmYtMSOz6JcVr9hz2SU0polbLpu5xLGMCiGEPPvr/gvfY6oriJZR1N2tzJCvohzNA4npkGRDzg2hxv9ScMYWTMmxqpGdU07oOtoJoDvUOpNfYLcLHIO4t1/i09WpF9aoC2u8r10ayoJ3AiV5wputLzllZWFwvN3xrhRJlip72nWwX5eaYS4TJ83gNpGhwYS6jqAWc2oHKLxcaXgs6Vp0o009icMV6BOGPzNVH1DJHqyNIMh6HIFtq89eEQIKXx2FeudjikKH9mK0k44pFO8FU+YB24q4thY0wXq6ld8Te7GAPJhqxz77tMzv4GcQGJQ5PGv4c/eL2ujgUemO1ELxmzVn4Zvpr0pcHGuwjTecpZiv0Ys6NOlMmFyXeOp/fUMhu3JVj/KBk60zYv3TqIeaODJ5EPWE400HS6sTCUyUbNvuFryAZ+tGr/52Sj+6oEQwmFGMoailU7M1xWQ1z37tXn6NLzjHZcB/BSIyp3IXU4lg8mjcdij5FcHnxVjKDlm4YEmpoqoMqRkSHbanBVgZGFBbCc4+2hJy/Mv3TtDIJ9VdSceKW6aRtNX1gVBBs47hKQg5DMlpu34rdjVzbKricOoEymgI7w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2158.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(36756003)(8676002)(44832011)(2906002)(956004)(2616005)(38100700002)(38350700002)(6666004)(316002)(6916009)(8936002)(6506007)(186003)(6486002)(66946007)(26005)(83380400001)(5660300002)(66556008)(86362001)(6512007)(66476007)(508600001)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?unZ5ZHvMIkb8Ilsxv5GlpenNkltc?= =?utf-8?q?Bu3vMHznAStHFAL8EyqUrpKbiz5g1e14ti0kYkZ5iCo3qHx+k2OGm/z6J+1ahOjZ2?= =?utf-8?q?eea96zTFt9JhPUeo8iowW9igA+nq4seZqHo50KPE/F0t47Fd1X9TBjRNjfd2Dy+0+?= =?utf-8?q?CbfeEUxmzmauJJzOf2xXxiJiyUUavxgYS7wjFSTi1sBquDdEAtzQuNoo1z9xC2Zvc?= =?utf-8?q?bWcDEDNai0GKgUozHDcutVslWW63XCf+IfbM9b7NSaHmepDgb8mCgpJzVIeeem+c3?= =?utf-8?q?5vITU5FG7tkf6n5Mp8Adkm9EGt5DNerp/PrwqXIGSGywhUJw9+QGO5ceS6c5bhG9v?= =?utf-8?q?oaqSaqSsXwQkHc12mi15XL+76Aosl02NDzhKwLWFLOnKbtkBPxLbv6hQmar645Y+C?= =?utf-8?q?CGm/wLlf8s/MWXq8ndRC+A0w4fwbCF2tU8o7etHL6RrgqCvdZk125jHlpdYEoygEH?= =?utf-8?q?B2V2IBoryfqg5JRWicIWg/bv8DwAnoa1nNhcgjowgEDsd0KvBlbudJbnMGj4/IWTi?= =?utf-8?q?KW5GhAZWvt4onucB9UG/6cJjP4knJ/WpcEi4XFfrOQJBiJNfv274f34aHbnqvwMpf?= =?utf-8?q?NrS230j+28YjeTQTqHobhWto6m3MbUETSY5jP/f8xU/+FWOnJ591CUICOsjQC0Vas?= =?utf-8?q?jnGH8AGq+AKmBpJB7Svu+M4SPMVIFeDMFUfygEcqgcs6ypVjgyA32YAkJH9y328mN?= =?utf-8?q?xvXtvkTTbJm9pZnIea6e21yG2VTgfsGX88Mz4PxVPgqVcW0kC9F23wNBhZhs0T9p8?= =?utf-8?q?vuRDMWCHg7pL4TgAzwceJ4mSPo276pnHJhp0QiKYRnnThcAOzNWjBTCGkY3FMcJZ7?= =?utf-8?q?Un8hb3hOvkOQKM8iSeRx6uU2OakrtsbT8LaOGTTTEzJP74RVORsXhcHRBbO4meWdy?= =?utf-8?q?XEqIJi/ApCr3Q/fprdK8ZNTCBr0Xi7NfOVvrtLjr13KHBQrsOF7McF2Ayrvm6r34u?= =?utf-8?q?A0unHFVL5jW61tNmLE4zCAOgo79U1YmVVWnAbuXzh0ftAfeTsU+B/q09da4R6g8Ph?= =?utf-8?q?Rcl1O8vjsG22K8/zIgG7dvzqhO87rFbShvZd/qLe7hHQ1dl36wFeaZPIbgKhTKzfu?= =?utf-8?q?E0Rksua6MNSO7SVluHmGUzQXg2pfiJRIwBuFak81fH4FzMSXUvyiDYM4wI//1bn/C?= =?utf-8?q?VxoAilutn2QdEHPC4J2emxsirSqpsqG/vD5prBeTJB749fgfMcY5A7N+VhX6RKbmW?= =?utf-8?q?sKDBMbqhhInzJvIIrsqOYGLh9v61CukxUzZccgYqQ1VHPh115odYL/Voftsi8lWw4?= =?utf-8?q?LwXntB89yxwLIev3?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d64d1a89-740c-4696-de26-08d982b0f0d0 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2021 18:51:11.7030 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BrtjOvuXF5YWFh5fXsMGlpUYFuQFR2TDIcN5KoRbtbWyf0aFPBnspYL+JNKM9WvVUfivhFib9yZZTdDjhG/t/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1661 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10121 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 mlxlogscore=870 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2109280110 X-Proofpoint-GUID: AIixv8SkFORUZodbk9QulePCSidd_Lvz X-Proofpoint-ORIG-GUID: AIixv8SkFORUZodbk9QulePCSidd_Lvz X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 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> From: Indu Bhagat via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Indu Bhagat <indu.bhagat@oracle.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
ctf: Do not warn for CTF not supported for GNU GIMPLE
|
|
Commit Message
Indu Bhagat
Sept. 28, 2021, 6:51 p.m. UTC
CTF is supported for C only. Currently, a warning is emitted if the -gctf command line option is specified for a non-C frontend. This warning is also used by the GCC testsuite framework - it skips adding -gctf to the list of debug flags for automated testing, if CTF is not supported for the frontend. The following warning, however, is not useful in case of LTO: "lto1: note: CTF debug info requested, but not supported for ‘GNU GIMPLE’ frontend" This patch disables the generation of the above warning for GNU GIMPLE. Bootstrapped and regression tested on x86_64. gcc/ChangeLog: * toplev.c (process_options): Do not warn for GNU GIMPLE. --- gcc/toplev.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
Comments
On Tue, Sep 28, 2021 at 8:52 PM Indu Bhagat via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > CTF is supported for C only. Currently, a warning is emitted if the -gctf > command line option is specified for a non-C frontend. This warning is also > used by the GCC testsuite framework - it skips adding -gctf to the list of > debug flags for automated testing, if CTF is not supported for the frontend. > > The following warning, however, is not useful in case of LTO: > > "lto1: note: CTF debug info requested, but not supported for ‘GNU GIMPLE’ > frontend" > > This patch disables the generation of the above warning for GNU GIMPLE. > > Bootstrapped and regression tested on x86_64. > > gcc/ChangeLog: > > * toplev.c (process_options): Do not warn for GNU GIMPLE. > --- > gcc/toplev.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/gcc/toplev.c b/gcc/toplev.c > index e1688aa..511a343 100644 > --- a/gcc/toplev.c > +++ b/gcc/toplev.c > @@ -1416,14 +1416,16 @@ process_options (void) > debug_info_level = DINFO_LEVEL_NONE; > } > > - /* CTF is supported for only C at this time. > - Compiling with -flto results in frontend language of GNU GIMPLE. */ > + /* CTF is supported for only C at this time. */ > if (!lang_GNU_C () > && ctf_debug_info_level > CTFINFO_LEVEL_NONE) > { > - inform (UNKNOWN_LOCATION, > - "CTF debug info requested, but not supported for %qs frontend", > - language_string); > + /* Compiling with -flto results in frontend language of GNU GIMPLE. It > + is not useful to warn in that case. */ > + if (!startswith (lang_hooks.name, "GNU GIMPLE")) please use in_lto_p instead OK with that change. > + inform (UNKNOWN_LOCATION, > + "CTF debug info requested, but not supported for %qs frontend", > + language_string); > ctf_debug_info_level = CTFINFO_LEVEL_NONE; > } > > -- > 1.8.3.1 >
On 9/29/21 12:14 AM, Richard Biener wrote: > On Tue, Sep 28, 2021 at 8:52 PM Indu Bhagat via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: >> >> CTF is supported for C only. Currently, a warning is emitted if the -gctf >> command line option is specified for a non-C frontend. This warning is also >> used by the GCC testsuite framework - it skips adding -gctf to the list of >> debug flags for automated testing, if CTF is not supported for the frontend. >> >> The following warning, however, is not useful in case of LTO: >> >> "lto1: note: CTF debug info requested, but not supported for ‘GNU GIMPLE’ >> frontend" >> >> This patch disables the generation of the above warning for GNU GIMPLE. >> >> Bootstrapped and regression tested on x86_64. >> >> gcc/ChangeLog: >> >> * toplev.c (process_options): Do not warn for GNU GIMPLE. >> --- >> gcc/toplev.c | 12 +++++++----- >> 1 file changed, 7 insertions(+), 5 deletions(-) >> >> diff --git a/gcc/toplev.c b/gcc/toplev.c >> index e1688aa..511a343 100644 >> --- a/gcc/toplev.c >> +++ b/gcc/toplev.c >> @@ -1416,14 +1416,16 @@ process_options (void) >> debug_info_level = DINFO_LEVEL_NONE; >> } >> >> - /* CTF is supported for only C at this time. >> - Compiling with -flto results in frontend language of GNU GIMPLE. */ >> + /* CTF is supported for only C at this time. */ >> if (!lang_GNU_C () >> && ctf_debug_info_level > CTFINFO_LEVEL_NONE) >> { >> - inform (UNKNOWN_LOCATION, >> - "CTF debug info requested, but not supported for %qs frontend", >> - language_string); >> + /* Compiling with -flto results in frontend language of GNU GIMPLE. It >> + is not useful to warn in that case. */ >> + if (!startswith (lang_hooks.name, "GNU GIMPLE")) > > please use in_lto_p instead > > OK with that change. > in_lto_p is set later in lto_init () (when its time for do_compile ()). in_lto_p's updated value is not available at this point in process_options (). >> + inform (UNKNOWN_LOCATION, >> + "CTF debug info requested, but not supported for %qs frontend", >> + language_string); >> ctf_debug_info_level = CTFINFO_LEVEL_NONE; >> } >> >> -- >> 1.8.3.1 >>
On Wed, Sep 29, 2021 at 5:55 PM Indu Bhagat <indu.bhagat@oracle.com> wrote: > > On 9/29/21 12:14 AM, Richard Biener wrote: > > On Tue, Sep 28, 2021 at 8:52 PM Indu Bhagat via Gcc-patches > > <gcc-patches@gcc.gnu.org> wrote: > >> > >> CTF is supported for C only. Currently, a warning is emitted if the -gctf > >> command line option is specified for a non-C frontend. This warning is also > >> used by the GCC testsuite framework - it skips adding -gctf to the list of > >> debug flags for automated testing, if CTF is not supported for the frontend. > >> > >> The following warning, however, is not useful in case of LTO: > >> > >> "lto1: note: CTF debug info requested, but not supported for ‘GNU GIMPLE’ > >> frontend" > >> > >> This patch disables the generation of the above warning for GNU GIMPLE. > >> > >> Bootstrapped and regression tested on x86_64. > >> > >> gcc/ChangeLog: > >> > >> * toplev.c (process_options): Do not warn for GNU GIMPLE. > >> --- > >> gcc/toplev.c | 12 +++++++----- > >> 1 file changed, 7 insertions(+), 5 deletions(-) > >> > >> diff --git a/gcc/toplev.c b/gcc/toplev.c > >> index e1688aa..511a343 100644 > >> --- a/gcc/toplev.c > >> +++ b/gcc/toplev.c > >> @@ -1416,14 +1416,16 @@ process_options (void) > >> debug_info_level = DINFO_LEVEL_NONE; > >> } > >> > >> - /* CTF is supported for only C at this time. > >> - Compiling with -flto results in frontend language of GNU GIMPLE. */ > >> + /* CTF is supported for only C at this time. */ > >> if (!lang_GNU_C () > >> && ctf_debug_info_level > CTFINFO_LEVEL_NONE) > >> { > >> - inform (UNKNOWN_LOCATION, > >> - "CTF debug info requested, but not supported for %qs frontend", > >> - language_string); > >> + /* Compiling with -flto results in frontend language of GNU GIMPLE. It > >> + is not useful to warn in that case. */ > >> + if (!startswith (lang_hooks.name, "GNU GIMPLE")) > > > > please use in_lto_p instead > > > > OK with that change. > > > > in_lto_p is set later in lto_init () (when its time for do_compile ()). > > in_lto_p's updated value is not available at this point in > process_options (). I see - a bit ugly IMHO but I guess the patch is OK then. Thanks, Richard. > >> + inform (UNKNOWN_LOCATION, > >> + "CTF debug info requested, but not supported for %qs frontend", > >> + language_string); > >> ctf_debug_info_level = CTFINFO_LEVEL_NONE; > >> } > >> > >> -- > >> 1.8.3.1 > >> >
diff --git a/gcc/toplev.c b/gcc/toplev.c index e1688aa..511a343 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1416,14 +1416,16 @@ process_options (void) debug_info_level = DINFO_LEVEL_NONE; } - /* CTF is supported for only C at this time. - Compiling with -flto results in frontend language of GNU GIMPLE. */ + /* CTF is supported for only C at this time. */ if (!lang_GNU_C () && ctf_debug_info_level > CTFINFO_LEVEL_NONE) { - inform (UNKNOWN_LOCATION, - "CTF debug info requested, but not supported for %qs frontend", - language_string); + /* Compiling with -flto results in frontend language of GNU GIMPLE. It + is not useful to warn in that case. */ + if (!startswith (lang_hooks.name, "GNU GIMPLE")) + inform (UNKNOWN_LOCATION, + "CTF debug info requested, but not supported for %qs frontend", + language_string); ctf_debug_info_level = CTFINFO_LEVEL_NONE; }