Re: [1/2] OpenACC routine support

2015-12-03 Thread Thomas Schwinge
Hi Cesar! On Wed, 2 Dec 2015 15:37:17 -0800, Cesar Philippidis wrote: > On 12/01/2015 06:49 AM, Cesar Philippidis wrote: > > On 12/01/2015 06:40 AM, Thomas Schwinge wrote: > > > >> I noticed while working on other test cases: > >> > >> On Wed, 18 Nov 2015 11:02:01

Re: [1/2] OpenACC routine support

2015-12-03 Thread Cesar Philippidis
On 12/03/2015 12:36 AM, Thomas Schwinge wrote: >> Here's the updated patch. > > ENOPATCH. Here it is. >> The test cases were written in a way such that >> none of them needed to be updated with these changes. > > ... which potentially means they'd match for all kinds of "random" >

Re: [1/2] OpenACC routine support

2015-12-02 Thread Cesar Philippidis
On 12/01/2015 06:49 AM, Cesar Philippidis wrote: > On 12/01/2015 06:40 AM, Thomas Schwinge wrote: > >> I noticed while working on other test cases: >> >> On Wed, 18 Nov 2015 11:02:01 -0800, Cesar Philippidis >> wrote: >>> --- a/gcc/cp/parser.c >>> +++ b/gcc/cp/parser.c

Re: [1/2] OpenACC routine support

2015-12-01 Thread Cesar Philippidis
On 12/01/2015 06:40 AM, Thomas Schwinge wrote: > I noticed while working on other test cases: > > On Wed, 18 Nov 2015 11:02:01 -0800, Cesar Philippidis > wrote: >> --- a/gcc/cp/parser.c >> +++ b/gcc/cp/parser.c > >> @@ -1318,13 +1318,21 @@ cp_finalize_omp_declare_simd

Re: [1/2] OpenACC routine support

2015-12-01 Thread Thomas Schwinge
Hi Cesar! I noticed while working on other test cases: On Wed, 18 Nov 2015 11:02:01 -0800, Cesar Philippidis wrote: > --- a/gcc/cp/parser.c > +++ b/gcc/cp/parser.c > @@ -1318,13 +1318,21 @@ cp_finalize_omp_declare_simd (cp_parser *parser, tree > fndecl) > } > }

Re: [1/2] OpenACC routine support

2015-11-19 Thread Jakub Jelinek
On Wed, Nov 18, 2015 at 11:02:01AM -0800, Cesar Philippidis wrote: > static inline void > cp_ensure_no_oacc_routine (cp_parser *parser) > { > - cp_finalize_oacc_routine (parser, NULL_TREE, false, true); > + if (parser->oacc_routine && !parser->oacc_routine->error_seen) > +{ > + tree

Re: [1/2] OpenACC routine support

2015-11-18 Thread Cesar Philippidis
On 11/10/2015 12:16 AM, Jakub Jelinek wrote: > On Mon, Nov 09, 2015 at 09:28:47PM -0800, Cesar Philippidis wrote: >> Here's the patch that Nathan was referring to. I ended up introducing a >> boolean variable named first in the various functions which call >> finalize_oacc_routines. The problem

Re: [1/2] OpenACC routine support

2015-11-10 Thread Jakub Jelinek
On Mon, Nov 09, 2015 at 09:28:47PM -0800, Cesar Philippidis wrote: > Here's the patch that Nathan was referring to. I ended up introducing a > boolean variable named first in the various functions which call > finalize_oacc_routines. The problem the original approach was having was > that the

Re: [1/2] OpenACC routine support

2015-11-10 Thread Cesar Philippidis
On 11/10/2015 12:16 AM, Jakub Jelinek wrote: > On Mon, Nov 09, 2015 at 09:28:47PM -0800, Cesar Philippidis wrote: >> Here's the patch that Nathan was referring to. I ended up introducing a >> boolean variable named first in the various functions which call >> finalize_oacc_routines. The problem

Re: [1/2] OpenACC routine support

2015-11-09 Thread Cesar Philippidis
On 11/09/2015 04:31 PM, Nathan Sidwell wrote: > On 11/03/15 10:35, Jakub Jelinek wrote: >> On Mon, Nov 02, 2015 at 02:21:43PM -0500, Nathan Sidwell wrote: >>> --- gcc/c/c-parser.c(revision 229667) >>> +++ gcc/c/c-parser.c(working copy) >>> @@ -1160,7 +1160,8 @@ enum c_parser_prec { >>>

Re: [1/2] OpenACC routine support

2015-11-09 Thread Cesar Philippidis
On 11/09/2015 04:48 PM, Nathan Sidwell wrote: > And these are the new tests. Cesar, c-c++-common/goacc/routine-5.c will > need adjusting with your C++ parser patch. You'll see the two cases > I've #if'd out. I enabled those tests in trunk with the patch I posted here

Re: [1/2] OpenACC routine support

2015-11-09 Thread Nathan Sidwell
On 11/03/15 10:35, Jakub Jelinek wrote: On Mon, Nov 02, 2015 at 02:21:43PM -0500, Nathan Sidwell wrote: --- gcc/c/c-parser.c(revision 229667) +++ gcc/c/c-parser.c(working copy) @@ -1160,7 +1160,8 @@ enum c_parser_prec { static void c_parser_external_declaration (c_parser *); static

Re: [1/2] OpenACC routine support

2015-11-09 Thread Nathan Sidwell
And these are the new tests. Cesar, c-c++-common/goacc/routine-5.c will need adjusting with your C++ parser patch. You'll see the two cases I've #if'd out. nathan 2015-11-09 Nathan Sidwell gcc/testsuite/ * c-c++-common/goacc/routine-1.c: New. *

Re: [1/2] OpenACC routine support

2015-11-03 Thread Jakub Jelinek
On Mon, Nov 02, 2015 at 02:21:43PM -0500, Nathan Sidwell wrote: > --- gcc/c/c-parser.c (revision 229667) > +++ gcc/c/c-parser.c (working copy) > @@ -1160,7 +1160,8 @@ enum c_parser_prec { > static void c_parser_external_declaration (c_parser *); > static void c_parser_asm_definition (c_parser

Re: [1/2] OpenACC routine support

2015-11-03 Thread Nathan Sidwell
On 11/03/15 10:35, Jakub Jelinek wrote: On Mon, Nov 02, 2015 at 02:21:43PM -0500, Nathan Sidwell wrote: --- gcc/c/c-parser.c(revision 229667) +++ gcc/c/c-parser.c(working copy) @@ -1160,7 +1160,8 @@ enum c_parser_prec { static void c_parser_external_declaration (c_parser *); static

Re: [1/2] OpenACC routine support

2015-11-02 Thread Nathan Sidwell
This is the core changes, an C & C++ FE parsing pieces. Parsing only deals with the gang, worker, vector & seq clauses. The nohost and bind clauses will be a later patch to port. The parsing is very similar to the omp declare simd parsing, in the way that it's hooked into the rest of the