Re: [PATCH] Fix ICE for static vars in offloaded functions

2018-03-26 Thread Tom de Vries
On 03/07/2018 04:01 PM, Richard Biener wrote: On Wed, 7 Mar 2018, Tom de Vries wrote: On 03/07/2018 02:29 PM, Richard Biener wrote: On Wed, 7 Mar 2018, Jakub Jelinek wrote: On Wed, Mar 07, 2018 at 02:20:26PM +0100, Tom de Vries wrote: Fix ICE for static vars in offloaded functions

Re: [PATCH] Fix ICE for static vars in offloaded functions

2018-03-07 Thread Jakub Jelinek
On Wed, Mar 07, 2018 at 02:20:26PM +0100, Tom de Vries wrote: > Fix ICE for static vars in offloaded functions > > 2018-03-06 Tom de Vries > > PR lto/84592 > * varpool.c (varpool_node::get_create): Mark static variables in > offloaded functions as

Re: [PATCH] Fix ICE for static vars in offloaded functions

2018-03-07 Thread Richard Biener
On Wed, 7 Mar 2018, Tom de Vries wrote: > On 03/07/2018 02:29 PM, Richard Biener wrote: > > On Wed, 7 Mar 2018, Jakub Jelinek wrote: > > > > > On Wed, Mar 07, 2018 at 02:20:26PM +0100, Tom de Vries wrote: > > > > Fix ICE for static vars in offloaded functions > > > > > > > > 2018-03-06 Tom de

Re: [PATCH] Fix ICE for static vars in offloaded functions

2018-03-07 Thread Tom de Vries
On 03/07/2018 02:29 PM, Richard Biener wrote: On Wed, 7 Mar 2018, Jakub Jelinek wrote: On Wed, Mar 07, 2018 at 02:20:26PM +0100, Tom de Vries wrote: Fix ICE for static vars in offloaded functions 2018-03-06 Tom de Vries PR lto/84592 * varpool.c

Re: [PATCH] Fix ICE for static vars in offloaded functions

2018-03-07 Thread Jakub Jelinek
On Wed, Mar 07, 2018 at 02:29:48PM +0100, Richard Biener wrote: > On Wed, 7 Mar 2018, Jakub Jelinek wrote: > > > On Wed, Mar 07, 2018 at 02:20:26PM +0100, Tom de Vries wrote: > > > Fix ICE for static vars in offloaded functions > > > > > > 2018-03-06 Tom de Vries > > >

Re: [PATCH] Fix ICE for static vars in offloaded functions

2018-03-07 Thread Richard Biener
On Wed, 7 Mar 2018, Jakub Jelinek wrote: > On Wed, Mar 07, 2018 at 02:20:26PM +0100, Tom de Vries wrote: > > Fix ICE for static vars in offloaded functions > > > > 2018-03-06 Tom de Vries > > > > PR lto/84592 > > * varpool.c (varpool_node::get_create): Mark

[PATCH] Fix ICE for static vars in offloaded functions

2018-03-07 Thread Tom de Vries
Hi, if we compile the testcase pr84592-2.c from the patch: ... #include int main (void) { int n[1]; n[0] = 3; #pragma omp target { static int test[4] = { 1, 2, 3, 4 }; n[0] += test[n[0]]; } if (n[0] != 7) abort (); return 0; } ... for nvptx offloading, we run into