[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
Wed Nov 30 16:58:00 GMT 2016


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

--- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Ah, sorry if I misunderstood and got carried away.

>From my investigation it looks like for the '<built-in>' issue it's just a
matter of setting DECL_ABSTRACT_ORIGIN in create_omp_child_function (not sure
if that's a stretch of the intended usage or not).  Not sure if you're working
on this bug yourself -- if not, I can regtest and submit this patch:

diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 7bcaeee..53b75bb 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -2499,6 +2499,7 @@ create_omp_child_function (omp_context *ctx, bool
task_copy)
   DECL_CONTEXT (decl) = NULL_TREE;
   DECL_INITIAL (decl) = make_node (BLOCK);
   BLOCK_SUPERCONTEXT (DECL_INITIAL (decl)) = decl;
+  DECL_ABSTRACT_ORIGIN (decl) = DECL_ORIGIN (current_function_decl);
   if (omp_maybe_offloaded_ctx (ctx))
     {
       cgraph_node::get_create (decl)->offloadable = 1;


More information about the Gcc-bugs mailing list