[Bug c++/78589] g++ prints <built-in> instead of a function name when warning in an OpenMP outlined function

amonakov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 29 15:25:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78589

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amonakov at gcc dot gnu.org

--- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
A similar issue can be seen with IPA cloning.  It's more rare, because it's
triggered only with warnings that are issued late, after IPA transforms (note
the extra '.constprop' in the following sample).

I think the same solution should be developed for IPA clones and OpenMP
outlined functions.

$ cat t.c
__attribute__((noinline))
static int foo(int v)
{
  int r;
  return v?v:r;
}
int bar(void)
{
  return foo(0);
}

gcc -S -Wall -O2 t.c
t.c: In function ‘foo.constprop’:
t.c:5:13: warning: ‘r’ is used uninitialized in this function [-Wuninitialized]
   return v?v:r;
          ~~~^~


More information about the Gcc-bugs mailing list