On 11/13/2014 10:52 PM, Jakub Jelinek wrote: > On Thu, Nov 13, 2014 at 05:44:40PM -0800, Cesar Philippidis wrote: >> Thanks. I couldn't figure out how to assign the bugs in the PR. Maybe my >> account doesn't have permission to do so. Regardless, I'll work on them. > > Use your @gcc.gnu.org account instead, then you have far more permissions > in bugzilla.
Thanks. I'll look into that. >> --- a/gcc/fortran/gfortran.h >> +++ b/gcc/fortran/gfortran.h >> @@ -1262,14 +1262,8 @@ typedef struct gfc_omp_clauses >> gfc_expr_list *tile_list; >> unsigned async:1, gang:1, worker:1, vector:1, seq:1, independent:1; >> unsigned wait:1, par_auto:1, gang_static:1; > > The /* !$ACC DECLARE locus. */ comment wouldn't hurt here. > >> --- a/gcc/fortran/match.c >> +++ b/gcc/fortran/match.c >> @@ -2491,8 +2491,8 @@ match_exit_cycle (gfc_statement st, gfc_exec_op op) >> >> if (o != NULL) >> { >> - gfc_error ("%s statement at %C leaving OpenMP or OpenACC structured >> block", >> - gfc_ascii_statement (st)); >> + gfc_error ("%s statement at %C leaving %s structured block", >> + gfc_ascii_statement (st), is_oacc (p) ? "OpenACC" : "OpenMP"); > > You want > gfc_error (is_oacc (p) > ? "%s statement at %C leaving OpenACC structured block" > : "%s statement at %C leaving OpenMP structured block", > gfc_ascii_statement (st)); > instead to be more translation friendly. > >> @@ -5545,3 +5547,28 @@ duplicate_main: >> gfc_done_2 (); >> return true; >> } >> + >> +/* Return true if this state data represents an OpenACC region. */ >> +bool >> +is_oacc (gfc_state_data *sd) >> +{ >> + switch (sd->construct->op) >> + { >> + case EXEC_OACC_PARALLEL_LOOP:break; >> + case EXEC_OACC_PARALLEL: > > What is that break; doing there? Then you fall through into end of function > without return (and missing space before it). It's bogus. I've applied the attach patch to gomp-4_0-branch which addresses these two problems. Thanks, Cesar
2014-11-13 Cesar Philippidis <ce...@codesourcery.com> gcc/fortran/ * match.c (match_exit_cycle): Restructure error strings. * parse.c (is_oacc): Remove bogus break. Index: gcc/fortran/match.c =================================================================== --- gcc/fortran/match.c (revision 217532) +++ gcc/fortran/match.c (working copy) @@ -2491,8 +2491,10 @@ match_exit_cycle (gfc_statement st, gfc_ if (o != NULL) { - gfc_error ("%s statement at %C leaving %s structured block", - gfc_ascii_statement (st), is_oacc (p) ? "OpenACC" : "OpenMP"); + gfc_error (is_oacc (p) + ? "%s statement at %C leaving OpenACC structured block" + : "%s statement at %C leaving OpenMP structured block", + gfc_ascii_statement (st)); return MATCH_ERROR; } Index: gcc/fortran/parse.c =================================================================== --- gcc/fortran/parse.c (revision 217532) +++ gcc/fortran/parse.c (working copy) @@ -5554,7 +5554,7 @@ is_oacc (gfc_state_data *sd) { switch (sd->construct->op) { - case EXEC_OACC_PARALLEL_LOOP:break; + case EXEC_OACC_PARALLEL_LOOP: case EXEC_OACC_PARALLEL: case EXEC_OACC_KERNELS_LOOP: case EXEC_OACC_KERNELS: