aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-11-07 08:24:48 +0100
committerMartin Liska <mliska@suse.cz>2022-11-07 08:24:48 +0100
commit1b09b78ee61bd921ae78ebd0f7905b95b9e1c903 (patch)
tree9c04b59cdd2cd460f0727501d15402d31ffcf5a4 /gcc/fortran
parent1eb021edb27e26f95cda63df121f6bc951647599 (diff)
parentc4f8f8afd07680f9e718de1331cd09607bdd9ac8 (diff)
downloadgcc-1b09b78ee61bd921ae78ebd0f7905b95b9e1c903.zip
gcc-1b09b78ee61bd921ae78ebd0f7905b95b9e1c903.tar.gz
gcc-1b09b78ee61bd921ae78ebd0f7905b95b9e1c903.tar.bz2
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog12
-rw-r--r--gcc/fortran/openmp.cc10
-rw-r--r--gcc/fortran/trans-openmp.cc9
-rw-r--r--gcc/fortran/trans-types.cc4
4 files changed, 27 insertions, 8 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 1ca82cd..12002d9 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,15 @@
+2022-11-03 Tobias Burnus <tobias@codesourcery.com>
+
+ * openmp.cc (gfc_match_omp_clauses): Permit derived types for
+ the 'to' and 'from' clauses of 'target update'.
+ * trans-openmp.cc (gfc_trans_omp_clauses): Fixes for
+ derived-type changes; fix size for scalars.
+
+2022-10-28 Joseph Myers <joseph@codesourcery.com>
+
+ * trans-types.cc (gfc_get_function_type): Do not use
+ build_varargs_function_type_vec for unprototyped function.
+
2022-10-26 Harald Anlauf <anlauf@gmx.de>
PR fortran/103413
diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc
index 653c43f..e0e3b52 100644
--- a/gcc/fortran/openmp.cc
+++ b/gcc/fortran/openmp.cc
@@ -2499,9 +2499,10 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask,
true) == MATCH_YES)
continue;
if ((mask & OMP_CLAUSE_FROM)
- && gfc_match_omp_variable_list ("from (",
+ && (gfc_match_omp_variable_list ("from (",
&c->lists[OMP_LIST_FROM], false,
- NULL, &head, true) == MATCH_YES)
+ NULL, &head, true, true)
+ == MATCH_YES))
continue;
break;
case 'g':
@@ -3436,9 +3437,10 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask,
continue;
}
else if ((mask & OMP_CLAUSE_TO)
- && gfc_match_omp_variable_list ("to (",
+ && (gfc_match_omp_variable_list ("to (",
&c->lists[OMP_LIST_TO], false,
- NULL, &head, true) == MATCH_YES)
+ NULL, &head, true, true)
+ == MATCH_YES))
continue;
break;
case 'u':
diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc
index 9bd4e6c..4bfdf85 100644
--- a/gcc/fortran/trans-openmp.cc
+++ b/gcc/fortran/trans-openmp.cc
@@ -3626,7 +3626,10 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
gcc_unreachable ();
}
tree node = build_omp_clause (input_location, clause_code);
- 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
+ && n->expr->ref->next == NULL))
{
tree decl = gfc_trans_omp_variable (n->sym, false);
if (gfc_omp_privatize_by_reference (decl))
@@ -3666,13 +3669,13 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
{
tree ptr;
gfc_init_se (&se, NULL);
- if (n->expr->ref->u.ar.type == AR_ELEMENT)
+ if (n->expr->rank == 0)
{
gfc_conv_expr_reference (&se, n->expr);
ptr = se.expr;
gfc_add_block_to_block (block, &se.pre);
OMP_CLAUSE_SIZE (node)
- = TYPE_SIZE_UNIT (TREE_TYPE (ptr));
+ = TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (ptr)));
}
else
{
diff --git a/gcc/fortran/trans-types.cc b/gcc/fortran/trans-types.cc
index fdce56d..def7552 100644
--- a/gcc/fortran/trans-types.cc
+++ b/gcc/fortran/trans-types.cc
@@ -3297,7 +3297,9 @@ arg_type_list_done:
type = gfc_sym_type (sym);
if (is_varargs)
- type = build_varargs_function_type_vec (type, typelist);
+ /* This should be represented as an unprototyped type, not a type
+ with (...) prototype. */
+ type = build_function_type (type, NULL_TREE);
else
type = build_function_type_vec (type, typelist);