Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956, take 2)

2019-01-11 Thread Jeff Law
On 1/7/19 3:42 PM, Jakub Jelinek wrote: > Hi! > > On Thu, May 31, 2018 at 01:34:19PM -0400, Jason Merrill wrote: >> Returning error_mark_node from omp_copy_decl and then continuing seems >> like the problem, then. Would it really be that hard to return an >> uninitialized variable instead? > > T

Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956)

2018-06-18 Thread Martin Sebor
On 05/31/2018 11:43 AM, Jakub Jelinek wrote: On Thu, May 31, 2018 at 01:34:19PM -0400, Jason Merrill wrote: Where is the error_mark_node coming from in the first place? remap_type invoked during omp-low.c (scan_omp). omp_copy_decl returns error_mark_node for decls that tree-inline.c wants to r

Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956)

2018-05-31 Thread Jakub Jelinek
On Thu, May 31, 2018 at 01:34:19PM -0400, Jason Merrill wrote: > >> Where is the error_mark_node coming from in the first place? > > > > remap_type invoked during omp-low.c (scan_omp). > > omp_copy_decl returns error_mark_node for decls that tree-inline.c wants > > to remap, but they aren't actuall

Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956)

2018-05-31 Thread Jason Merrill
On Thu, May 31, 2018 at 11:31 AM, Jakub Jelinek wrote: > On Thu, May 31, 2018 at 11:19:08AM -0400, Jason Merrill wrote: >> > In my mind the issue boils down to two questions: >> > >> > 1) should the pretty printer handle error-mark-node gracefully >> >or is it appropriate for it to abort? >> >

Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956)

2018-05-31 Thread Jakub Jelinek
On Thu, May 31, 2018 at 11:19:08AM -0400, Jason Merrill wrote: > > In my mind the issue boils down to two questions: > > > > 1) should the pretty printer handle error-mark-node gracefully > >or is it appropriate for it to abort? > > 2) is it appropriate to be embedding/using error_mark_node in

Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956)

2018-05-31 Thread Jason Merrill
On Thu, May 31, 2018 at 11:00 AM, Martin Sebor wrote: > On 05/31/2018 07:30 AM, Jakub Jelinek wrote: >> >> On Thu, May 31, 2018 at 09:14:33AM -0400, Jason Merrill wrote: I came up with the following hack instead (or in addition to), replace those error_mark_node bounds with NULL (i.

Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956)

2018-05-31 Thread Martin Sebor
On 05/31/2018 07:30 AM, Jakub Jelinek wrote: On Thu, May 31, 2018 at 09:14:33AM -0400, Jason Merrill wrote: I came up with the following hack instead (or in addition to), replace those error_mark_node bounds with NULL (i.e. pretend flexible array members) if during OpenMP/OpenACC outlining we've

Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956)

2018-05-31 Thread Jakub Jelinek
On Thu, May 31, 2018 at 09:14:33AM -0400, Jason Merrill wrote: > > I came up with the following hack instead (or in addition to), > > replace those error_mark_node bounds with NULL (i.e. pretend flexible array > > members) if during OpenMP/OpenACC outlining we've decided not to pass around > > the

Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956)

2018-05-31 Thread Jason Merrill
On Thu, May 31, 2018 at 2:58 AM, Jakub Jelinek wrote: > On Wed, May 30, 2018 at 02:39:15PM -0600, Martin Sebor wrote: >> gcc/c-family/ChangeLog: >> >> PR middle-end/85956 >> * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): >> Handle error-mark-node in array boun

Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956)

2018-05-30 Thread Jakub Jelinek
On Wed, May 30, 2018 at 02:39:15PM -0600, Martin Sebor wrote: > gcc/c-family/ChangeLog: > > PR middle-end/85956 > * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): > Handle error-mark-node in array bounds gracefully. This isn't sufficient, as it still ICEs with