public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4235] ctf: Do not warn for CTF not supported for GNU GIMPLE
@ 2021-10-07 19:11 Indu Bhagat
  0 siblings, 0 replies; only message in thread
From: Indu Bhagat @ 2021-10-07 19:11 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ae2df1a347fad44fa70990311ca981698487b780

commit r12-4235-gae2df1a347fad44fa70990311ca981698487b780
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date:   Thu Oct 7 12:09:14 2021 -0700

    ctf: Do not warn for CTF not supported for GNU GIMPLE
    
    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.
    
    gcc/ChangeLog:
    
            * toplev.c (process_options): Do not warn for GNU GIMPLE.

Diff:
---
 gcc/toplev.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/gcc/toplev.c b/gcc/toplev.c
index ecb2b694970..1bb1794be96 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1408,14 +1408,16 @@ process_options (bool no_backend)
 	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;
     }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-07 19:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 19:11 [gcc r12-4235] ctf: Do not warn for CTF not supported for GNU GIMPLE Indu Bhagat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).