This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/71536] New: lto1 ICE: func-static constant in openmp offloaded function
- From: "bisqwit at iki dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Jun 2016 19:12:46 +0000
- Subject: [Bug lto/71536] New: lto1 ICE: func-static constant in openmp offloaded function
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71536
Bug ID: 71536
Summary: lto1 ICE: func-static constant in openmp offloaded
function
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: bisqwit at iki dot fi
Target Milestone: ---
With this example program:
#pragma omp declare target
void Process()
{
static const int value = 12;
}
#pragma omp end declare target
int main()
{
#pragma omp target
{
Process();
}
}
g++ crash.cc -fopenmp -O1
lto1: internal compiler error: Segmentation fault
0x93bcaf crash_signal
../../gcc/toplev.c:333
0x82d2eb input_offload_tables(bool)
../../gcc/lto-cgraph.c:1931
0x5c6590 read_cgraph_and_symbols
../../gcc/lto/lto.c:2858
0x5c6590 lto_main()
../../gcc/lto/lto.c:3304
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
mkoffload-intelmic: fatal error:
x86_64-pc-linux-gnu-accel-x86_64-intelmicemul-linux-gnu-gcc returned 1 exit
status
compilation terminated.
lto-wrapper: fatal error:
/usr/local/libexec/gcc/x86_64-pc-linux-gnu/6.1.0//accel/x86_64-intelmicemul-linux-gnu/mkoffload
returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
The main() can be deleted from the program, and the error still occurs.
This error requires at least -O1 to trigger it.
GCC version: 6.1.0