https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118794
Bug ID: 118794
Summary: The attached c++ openmp offload code fails, because
the c sqrt function makes nonlocal gotos..
Product: gcc
Version: 14.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: schulz.benjamin at googlemail dot com
Target Milestone: ---
Created attachment 60422
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60422&action=edit
header
Hi there, the attached openmp offload code will fail for 2 reasons. first,
there is an overloaded constructor and even though I pass -malias to the
offload compiler, it will not support this,
but what is more embarassing is the second problem in the function
qr_decomposition. gcc refuses to compile that function with the message "target
can not support nonlocal goto. It does not precisely state which line it is,
but by sequentially deleting code, one finds that it is this funny line 1964
here which causes the problem:
const T normc=sqrt(norm);
Well, aehm, of course, a square root can not work for values less than 0, but I
still have to call it on the gpu, so what now....