From edf86ec148f98f12a16ba9b2a26b0b66b6078c50 Mon Sep 17 00:00:00 2001 From: Daniel Franke Date: Tue, 11 May 2010 12:45:17 -0400 Subject: re PR fortran/43711 (Unformitive error message for two NOWAIT in OpenMP directive) gcc/fortran/: 2010-05-11 Daniel Franke PR fortran/43711 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters after OMP statement. (gfc_match_omp_critical): Likewise. (gfc_match_omp_flush): Likewise. (gfc_match_omp_workshare): Likewise. (gfc_match_omp_master): Likewise. (gfc_match_omp_ordered): Likewise. (gfc_match_omp_atomic): Likewise. (gfc_match_omp_barrier): Likewise. (gfc_match_omp_end_nowait): Likewise. gcc/testsuite/: 2010-05-11 Daniel Franke PR fortran/43711 * gfortran.dg/gomp/pr43711.f90: New. From-SVN: r159282 --- gcc/fortran/ChangeLog | 14 ++++++++++++++ gcc/fortran/openmp.c | 41 +++++++++++++++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 8 deletions(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1b8c65c..86a9574 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,19 @@ 2010-05-11 Daniel Franke + PR fortran/43711 + * openmp.c (gfc_match_omp_taskwait): Report unexpected characters + after OMP statement. + (gfc_match_omp_critical): Likewise. + (gfc_match_omp_flush): Likewise. + (gfc_match_omp_workshare): Likewise. + (gfc_match_omp_master): Likewise. + (gfc_match_omp_ordered): Likewise. + (gfc_match_omp_atomic): Likewise. + (gfc_match_omp_barrier): Likewise. + (gfc_match_omp_end_nowait): Likewise. + +2010-05-11 Daniel Franke + PR fortran/31820 * resolve.c (validate_case_label_expr): Removed FIXME. (resolve_select): Raise default warning on case labels out of range diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index c00e1b4..bbf7e5a 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -467,7 +467,10 @@ match gfc_match_omp_taskwait (void) { if (gfc_match_omp_eos () != MATCH_YES) - return MATCH_ERROR; + { + gfc_error ("Unexpected junk after TASKWAIT clause at %C"); + return MATCH_ERROR; + } new_st.op = EXEC_OMP_TASKWAIT; new_st.ext.omp_clauses = NULL; return MATCH_YES; @@ -482,7 +485,10 @@ gfc_match_omp_critical (void) if (gfc_match (" ( %n )", n) != MATCH_YES) n[0] = '\0'; if (gfc_match_omp_eos () != MATCH_YES) - return MATCH_ERROR; + { + gfc_error ("Unexpected junk after $OMP CRITICAL statement at %C"); + return MATCH_ERROR; + } new_st.op = EXEC_OMP_CRITICAL; new_st.ext.omp_name = n[0] ? xstrdup (n) : NULL; return MATCH_YES; @@ -508,6 +514,7 @@ gfc_match_omp_flush (void) gfc_match_omp_variable_list (" (", &list, true); if (gfc_match_omp_eos () != MATCH_YES) { + gfc_error ("Unexpected junk after $OMP FLUSH statement at %C"); gfc_free_namelist (list); return MATCH_ERROR; } @@ -654,7 +661,10 @@ match gfc_match_omp_workshare (void) { if (gfc_match_omp_eos () != MATCH_YES) - return MATCH_ERROR; + { + gfc_error ("Unexpected junk after $OMP WORKSHARE statement at %C"); + return MATCH_ERROR; + } new_st.op = EXEC_OMP_WORKSHARE; new_st.ext.omp_clauses = gfc_get_omp_clauses (); return MATCH_YES; @@ -665,7 +675,10 @@ match gfc_match_omp_master (void) { if (gfc_match_omp_eos () != MATCH_YES) - return MATCH_ERROR; + { + gfc_error ("Unexpected junk after $OMP MASTER statement at %C"); + return MATCH_ERROR; + } new_st.op = EXEC_OMP_MASTER; new_st.ext.omp_clauses = NULL; return MATCH_YES; @@ -676,7 +689,10 @@ match gfc_match_omp_ordered (void) { if (gfc_match_omp_eos () != MATCH_YES) - return MATCH_ERROR; + { + gfc_error ("Unexpected junk after $OMP ORDERED statement at %C"); + return MATCH_ERROR; + } new_st.op = EXEC_OMP_ORDERED; new_st.ext.omp_clauses = NULL; return MATCH_YES; @@ -687,7 +703,10 @@ match gfc_match_omp_atomic (void) { if (gfc_match_omp_eos () != MATCH_YES) - return MATCH_ERROR; + { + gfc_error ("Unexpected junk after $OMP ATOMIC statement at %C"); + return MATCH_ERROR; + } new_st.op = EXEC_OMP_ATOMIC; new_st.ext.omp_clauses = NULL; return MATCH_YES; @@ -698,7 +717,10 @@ match gfc_match_omp_barrier (void) { if (gfc_match_omp_eos () != MATCH_YES) - return MATCH_ERROR; + { + gfc_error ("Unexpected junk after $OMP BARRIER statement at %C"); + return MATCH_ERROR; + } new_st.op = EXEC_OMP_BARRIER; new_st.ext.omp_clauses = NULL; return MATCH_YES; @@ -712,7 +734,10 @@ gfc_match_omp_end_nowait (void) if (gfc_match ("% nowait") == MATCH_YES) nowait = true; if (gfc_match_omp_eos () != MATCH_YES) - return MATCH_ERROR; + { + gfc_error ("Unexpected junk after NOWAIT clause at %C"); + return MATCH_ERROR; + } new_st.op = EXEC_OMP_END_NOWAIT; new_st.ext.omp_bool = nowait; return MATCH_YES; -- cgit v1.1