This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/65419] incorrect sibcalls to libgomp functions
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 27 May 2015 16:55:32 +0000
- Subject: [Bug tree-optimization/65419] incorrect sibcalls to libgomp functions
- Auto-submitted: auto-generated
- References: <bug-65419-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65419
--- Comment #7 from vries at gcc dot gnu.org ---
Created attachment 35636
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35636&action=edit
gcc/testsuite/c-c++-common/goacc/kernels-parallel-loop-data-enter-exit-2.c
(In reply to cesar from comment #6)
> Isn't GOACC_parallel likely to have the same problem because hostaddrs may
> be written to?
GOACC_parallel is not declared with a fnspec, so there's no tailcall problem:
...
DEF_GOACC_BUILTIN (BUILT_IN_GOACC_PARALLEL, "GOACC_parallel",
BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_SIZE_INT_INT_VAR,
ATTR_NOTHROW_LIST)
...
OTOH, GOACC_parallel is an optimization barrier. So the attached testcase will
fail. AFAICT, the only way this can be helped is by postponing expansion of
the parallel region until ompexpandssa, in other words do the same as for
kernels.