re PR fortran/71704 (ICE with -fopenmp and some omp constructs)
authorJakub Jelinek <jakub@redhat.com>
Thu, 30 Jun 2016 17:45:21 +0000 (19:45 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 30 Jun 2016 17:45:21 +0000 (19:45 +0200)
commit6245ad72d23867f979d0960bdde9a8427c6ba262
treec2bfa8ece838421c7970feab49f1b7fb9a3e7488
parent351beab7f57e82ee88abaedc407ff793542c08ab
re PR fortran/71704 (ICE with -fopenmp and some omp constructs)

PR fortran/71704
* parse.c (matchs, matcho): Move right before decode_omp_directive.
If spec_only, only gfc_match the keyword and if successful, goto
do_spec_only.
(matchds, matchdo): Define.
(decode_omp_directive): Add spec_only local var and set it.
Use matchds or matchdo macros instead of matchs or matcho
for declare target, declare simd, declare reduction and threadprivate
directives.  Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
directive could be matched.
(next_statement): For ST_GET_FCN_CHARACTERISTICS restore
gfc_current_locus from old_locus even if there is no label.

* gfortran.dg/gomp/pr71704.f90: New test.

From-SVN: r237888
gcc/fortran/ChangeLog
gcc/fortran/parse.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/gomp/pr71704.f90 [new file with mode: 0644]