https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68773
Bug ID: 68773 Summary: fpta-ipa with GOACC_parallel does not work due to node->force_output Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org Target Milestone: --- As reported here ( https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00330.html ), some c-c++-common/goacc/kernels-alias-ipa-pta-{,2}.c scan tests fail. The tests pass for a compiler configured without accelerator, and fail for a compiler configure with accelerator. For the configuration with accelerator, the test fails because the force_output flag is set for the offloaded function, which causes the thread function to be handled as a non-local function in fipa-pta. The force_output flag is set by this bit here in expand_omp_target (which explains why we don't see the problem in the configuration without accelerator, which doesn't have ENABLE_OFFLOADING set): ... 12682 /* Prevent IPA from removing child_fn as unreachable, since there are no 12683 refs from the parent function to child_fn in offload LTO mode. */ 12684 if (ENABLE_OFFLOADING) 12685 cgraph_node::get (child_fn)->mark_force_output (); ...