https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84992
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Tom de Vries from comment #0) > When compiling this openacc testcase: > .... > #include <stdio.h> > > int > main (void) > { > int n[1]; > n[0] = 3; > #pragma acc parallel copy(n) > { > static const int test[] = {1,2,3,4}; > n[0] = test[n[0]]; > } > printf ("n: %d\n", n[0]); > > return 0; > } > ... > > we run into an ICE: > ... > lto1: internal compiler error: in input_varpool_node, at lto-cgraph.c:1424^M > ... > > We've reported the ICE at PR84592, where we use a slightly more complicated > example. > > But the first question here is: is this a valid openacc program? > > Given that function static variables are not supported in functions to which > a routine directive applies, are function static variables supported in > parallel regions, or not? > > If not, we should emit a proper error message. > > If so, we should implement the required semantics. Thomas, can you get this clarified with the OpenACC standard people? Thanks, - Tom