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

            Bug ID: 78589
           Summary: g++ prints <built-in> instead of a function name when
                    warning in an OpenMP outlined function
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamborm at gcc dot gnu.org
  Target Milestone: ---

When compiling the following testcase:

$ cat t.c
void bar (void)
{
#pragma omp parallel
  {
    int *p;
    *p = 345;
  }
}

with the g++ front-end, I get a bogus "<built-in>" function name in
the warning:

$ ~/gcc/trunk/inst/bin/g++ -fopenmp -c -Wall -O t.c
t.c: In function ‘<built-in>’:
t.c:6:8: warning: ‘p’ is used uninitialized in this function [-Wuninitialized]
     *p = 345;
     ~~~^~~~~
t.c:5:10: note: ‘p’ was declared here
     int *p;

The C front-end prints the function name as "bar._omp_fn.0" which
might also be a bit cryptic for the user but most probably less so.

Reply via email to