Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-05-20 Thread Jeff Law
On 05/20/14 08:10, Zamyatin, Igor wrote: Please look then on the following patch. Regtested successfully on x86_64. Is it ok for trunk and 4.9? gcc/cp/ChangeLog: 2014-05-20 Igor Zamyatin PR c/60189 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync from here to... (cp_pa

RE: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-05-20 Thread Zamyatin, Igor
n 0; +} Thanks, Igor > -Original Message- > From: Zamyatin, Igor > Sent: Tuesday, May 13, 2014 12:28 AM > To: 'Jason Merrill'; 'Jakub Jelinek' > Cc: 'GCC Patches (gcc-patches@gcc.gnu.org)'; Iyer, Balaji V > Subject: RE: [PATCH, PR60189, Cil

RE: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-05-12 Thread Zamyatin, Igor
laji V > > Subject: Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect > > Cilk_sync usage > > > > Oh, I see where the problem is coming from. Cilk_sync is a statement, > > but it's being parsed as an expression. Let's move it to > cp_parser_statem

RE: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-21 Thread Zamyatin, Igor
> > From: Jason Merrill [mailto:ja...@redhat.com] > > Sent: Monday, April 14, 2014 9:49 PM > > To: Zamyatin, Igor; Jakub Jelinek > > Cc: GCC Patches (gcc-patches@gcc.gnu.org); Iyer, Balaji V > > Subject: Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect > &g

RE: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-15 Thread Zamyatin, Igor
> -Original Message- > From: Jason Merrill [mailto:ja...@redhat.com] > Sent: Monday, April 14, 2014 9:49 PM > To: Zamyatin, Igor; Jakub Jelinek > Cc: GCC Patches (gcc-patches@gcc.gnu.org); Iyer, Balaji V > Subject: Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect

Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-14 Thread Jason Merrill
Oh, I see where the problem is coming from. Cilk_sync is a statement, but it's being parsed as an expression. Let's move it to cp_parser_statement. Jason

RE: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-14 Thread Zamyatin, Igor
> -Original Message- > From: Jason Merrill [mailto:ja...@redhat.com] > Sent: Monday, April 14, 2014 8:13 AM > To: Zamyatin, Igor; Jakub Jelinek > Cc: GCC Patches (gcc-patches@gcc.gnu.org); Iyer, Balaji V > Subject: Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect

Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-13 Thread Jason Merrill
On 04/11/2014 03:08 PM, Zamyatin, Igor wrote: I remembered - I haven't used cp_parser_require since it calls cp_lexer_consume_token which is not needed at this point. It is already called a bit earlier. So the call to cp_parser_require can replace that call as well. Jason

RE: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-11 Thread Zamyatin, Igor
> > >> + token = cp_lexer_peek_token (parser->lexer); > >> + if (token->type != CPP_SEMICOLON) > >> + { > >> + error_at (token->location, "%<_Cilk_sync%> must be > >> followed" > >> + " by semicolon"); > >> + post

RE: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-11 Thread Zamyatin, Igor
> > >> + token = cp_lexer_peek_token (parser->lexer); > >> + if (token->type != CPP_SEMICOLON) > >> + { > >> + error_at (token->location, "%<_Cilk_sync%> must be > >> followed" > >> + " by semicolon"); > >> + post

Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-11 Thread Jason Merrill
On 04/10/2014 10:27 AM, Jakub Jelinek wrote: I don't see the point of adding the extra {} around the whole case, there is no variable declared at that point. Agreed. + token = cp_lexer_peek_token (parser->lexer); + if (token->type != CPP_SEMICOLON) + { +

Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-10 Thread Jakub Jelinek
On Thu, Apr 10, 2014 at 02:23:16PM +, Zamyatin, Igor wrote: > 2014-04-10 Igor Zamyatin > > PR c++/60189 > * parser.c (cp_parser_postfix_expression): Make sure only > semicolon can go after Cilk_sync. > > gcc/testsuite/ChangeLog: > > 2014-04-10 Igor Zamyatin > > PR c++/60189 > * c-c++-

RE: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-10 Thread Zamyatin, Igor
s- > ow...@gcc.gnu.org] On Behalf Of Zamyatin, Igor > Sent: Thursday, April 10, 2014 5:56 PM > To: GCC Patches (gcc-patches@gcc.gnu.org) > Cc: Iyer, Balaji V; Jakub Jelinek (ja...@redhat.com) > Subject: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage > > Hi! > > This fixes ICE on inappropriate usage of Cilk_sync keyword. > > Bootstrapped/regtested on x86_64. Ok for trunk? > > > Thanks, > Igor > >

[PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-10 Thread Zamyatin, Igor
Hi! This fixes ICE on inappropriate usage of Cilk_sync keyword. Bootstrapped/regtested on x86_64. Ok for trunk? Thanks, Igor gcc/ChangeLog: 2014-04-10  Igor Zamyatin  PR c++/60189 * cp/parser.c (cp_parser_postfix_expression): Make sure only semicolon can go after Cilk_syn