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; }