https://bugs.llvm.org/show_bug.cgi?id=41826
Bug ID: 41826
Summary: libomptarget: Crash for global symbols with name
"times"
Product: OpenMP
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Runtime Library
Assignee: unassignedb...@nondot.org
Reporter: cra...@itc.rwth-aachen.de
CC: llvm-bugs@lists.llvm.org
For OpenMP codes using target device offloading global arrays must not be named
"times", because this causes a crash. I guess the there is some kind of nameing
conflict. Here is a reproducer:
//======================================
#ifndef BUG
#define BUG 1
#endif
#pragma omp declare target
#if BUG
int times[10];
#else
int times2[10];
#endif
#pragma omp end declare target
int main(void) {
#pragma omp target device(0)
{
#if BUG
times[8] = 42;
#else
times2[8] = 42;
#endif
}
return 0;
}
//======================================
If I rename the array from "times" to "times2" it works as expected. I compiled
with "clang -fopenmp -fopenmp-targets=x86_64-unknown-linux-gnu main.c -DBUG=1
-o bug".
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs