When acc routine is in a function, the first symbol resolved
was the function result and not the function name itself. It was
then failing the deferred attachment because the mangled name
had the entity attach to it. This patch fix the name resolution
for the function name in acc routine directive.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Looks good. The comment is simply about not checking for compiler generated symbol.
flang/test/Lower/OpenACC/acc-routine.f90 | ||
---|---|---|
5 | I wonder if we should relax this part which check's acc.routine's symbol name - this name is not something guaranteed since it is synthetic name from compiler. |
flang/test/Lower/OpenACC/acc-routine.f90 | ||
---|---|---|
5 | Do you mean the mangled name (_QPacc_routine10) or the acc.routine name _QPacc_routine10. The mangled name is guaranteed in flang and it's the only way to attach the acc.routine to the actual function. For the acc_routine_9 it is indeed also generated but since the attribute has it on the function I feel it is a nice check to have to make sure we attach the correct information to the correct routine. |
I wonder if we should relax this part which check's acc.routine's symbol name - this name is not something guaranteed since it is synthetic name from compiler.