diff mbox

[gomp4] Remove device-specific filtering during parsing for OpenACC

Message ID 20150717194939.55706c07@octopus
State New
Headers show

Commit Message

Julian Brown July 17, 2015, 6:49 p.m. UTC
On Fri, 17 Jul 2015 14:57:14 +0200
Thomas Schwinge <thomas@codesourcery.com> wrote:

> Your commit r225927 appears to have caused:
> 
>     [-PASS:-]{+FAIL: libgomp.fortran/declare-simd-2.f90   -O0
> (internal compiler error)+} {+FAIL:+}
> libgomp.fortran/declare-simd-2.f90   -O0  (test for excess errors)
> [-PASS:-]{+UNRESOLVED:+} libgomp.fortran/declare-simd-2.f90   -O0
> [-execution test-] [-PASS:-]{+compilation failed to produce
> executable+} [same for other optimization levels]

This is fixed by the attached. I will apply shortly.

Thanks,

Julian

ChangeLog

    gcc/fortran/
    * trans-openmp.c (gfc_trans_omp_clauses): Add NULL check for
    clauses.
diff mbox

Patch

commit 7171ab9066e6b4bb84c317d1892a3a0a77cf63ae
Author: Julian Brown <julian@codesourcery.com>
Date:   Fri Jul 17 11:46:56 2015 -0700

    Add NULL check for clauses in gfc_trans_omp_clauses.

diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 20a1e65..378dd3b 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -2668,6 +2668,9 @@  gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
   tree omp_clauses = gfc_trans_omp_clauses_1 (block, clauses, where,
 					      declare_simd);
 
+  if (clauses == NULL)
+    return NULL_TREE;
+
   for (; clauses->device_types; clauses = clauses->dtype_clauses)
     {
       tree c, following_clauses = NULL_TREE, dev_list = NULL_TREE;