aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorCesar Philippidis <cesar@codesourcery.com>2018-06-13 07:31:17 -0700
committerCesar Philippidis <cesar@gcc.gnu.org>2018-06-13 07:31:17 -0700
commit0be606d3ce7b39148d0d0aed54bae3b4fe9478af (patch)
tree541b70e1c266b2847191e307eb4153c3970d2883 /gcc/fortran
parentadc41ebeab0c027cce9e1fb1e1356a66d89aeb57 (diff)
downloadgcc-0be606d3ce7b39148d0d0aed54bae3b4fe9478af.zip
gcc-0be606d3ce7b39148d0d0aed54bae3b4fe9478af.tar.gz
gcc-0be606d3ce7b39148d0d0aed54bae3b4fe9478af.tar.bz2
re PR fortran/85703 ([openacc] ICE in resolve_fntype, at fortran/resolve.c:16313)
PR fortran/85703 gcc/fortran/ * parse.c (decode_oacc_directive): Set gfc_matching_function to false. (decode_omp_directive): Likewise. gcc/testsuite/ * gfortran.dg/goacc/pr85703.f90: New test. * gfortran.dg/gomp/pr85703.f90: New test. From-SVN: r261551
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/parse.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 9018933..25b5f37 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,12 @@
2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
+ PR fortran/85703
+ * parse.c (decode_oacc_directive): Set gfc_matching_function
+ to false.
+ (decode_omp_directive): Likewise.
+
+2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
+
PR fortran/85702
* openmp.c (gfc_match_oacc_wait): Use %C to report error location.
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index a3693a1..4ce6eb4 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -624,6 +624,8 @@ decode_oacc_directive (void)
gfc_clear_error (); /* Clear any pending errors. */
gfc_clear_warning (); /* Clear any pending warnings. */
+ gfc_matching_function = false;
+
if (gfc_pure (NULL))
{
gfc_error_now ("OpenACC directives at %C may not appear in PURE "
@@ -795,6 +797,8 @@ decode_omp_directive (void)
gfc_clear_error (); /* Clear any pending errors. */
gfc_clear_warning (); /* Clear any pending warnings. */
+ gfc_matching_function = false;
+
if (gfc_current_state () == COMP_FUNCTION
&& gfc_current_block ()->result->ts.kind == -1)
spec_only = true;