aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-01-07 08:14:41 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2020-01-07 08:14:41 +0100
commit851817d85ed21fa9a591720ec53d8754b376500e (patch)
treee0fd3e00f7f85aa7e3f9e2ab553a053705f7f159 /gcc
parentf74f6092ace420bd8a4498697754b06fc6da63bd (diff)
downloadgcc-851817d85ed21fa9a591720ec53d8754b376500e.zip
gcc-851817d85ed21fa9a591720ec53d8754b376500e.tar.gz
gcc-851817d85ed21fa9a591720ec53d8754b376500e.tar.bz2
re PR fortran/93162 (gcc/fortran/trans-openmp.c:2469:50: runtime error: load of value 145992800, which is not a valid value for type 'ar_type' since r279628)
PR fortran/93162 * trans-openmp.c (gfc_trans_omp_clauses): Check for REF_ARRAY type before testing u.ar.type == AR_FULL. From-SVN: r279944
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-openmp.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index a09d370..22f8047 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2020-01-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/93162
+ * trans-openmp.c (gfc_trans_omp_clauses): Check for REF_ARRAY type
+ before testing u.ar.type == AR_FULL.
+
2020-01-04 Tobias Burnus <tobias@codesourcery.com>
PR fortran/91640
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 918af74..9835d2a 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -2495,7 +2495,9 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
tree decl = gfc_trans_omp_variable (n->sym, false);
if (DECL_P (decl))
TREE_ADDRESSABLE (decl) = 1;
- if (n->expr == NULL || n->expr->ref->u.ar.type == AR_FULL)
+ if (n->expr == NULL
+ || (n->expr->ref->type == REF_ARRAY
+ && n->expr->ref->u.ar.type == AR_FULL))
{
tree present = gfc_omp_check_optional_argument (decl, true);
if (n->sym->ts.type == BT_CLASS)