[llvm-bugs] [Bug 48759] New: pragma omp target causes fopen "fatal error" when compile with preprocessed file
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jan 15 06:03:59 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48759
Bug ID: 48759
Summary: pragma omp target causes fopen "fatal error" when
compile with preprocessed file
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: melanie.blower at intel.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Hello, When I receive a bug report with a preprocessed file, I often do not
receive the original file and the #line markers show the file name belonging to
the customer but not on my server. When compiling this program, a fatal error
is reported. Evidently the file name is scraped from #line instead of using the
file name used to invoke the compiler. Here is test case:
cat newfile-abfeb7.ii
# 1 "nofile.cpp"
void a() {
#pragma omp target
;
}
Here's the invocation:
clang-12 -cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -fopenmp
newfile-abfeb7.ii
Response:
fatal error: cannot open file 'nofile.cpp': No such file or directory
1 error generated.
It appears that CGOpenMPRuntime::registerTargetRegion
(CGOpenMPRuntime.cpp:6421) is called from
CodeGenFunction::EmitLateOutlineOMPDirective, which is trying to open thefile
for some reason. It seems based on the comments to wish to create a unique id
for the ‘target entry’, but it uses the current file’s ‘UniqueID’
(https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CGOpenMPRuntime.cpp#L1651)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210115/90831684/attachment.html>
More information about the llvm-bugs
mailing list