diff options
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/fortran/frontend-passes.c | 4 | ||||
-rw-r--r-- | gcc/fortran/interface.c | 2 | ||||
-rw-r--r-- | gcc/fortran/trans-openmp.c | 10 |
4 files changed, 33 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 22e84cf8dd0..b5dfcf1fa47 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,21 @@ +2014-10-10 Jakub Jelinek <jakub@redhat.com> + + PR fortran/59488 + * trans-openmp.c (gfc_omp_predetermined_sharing): Return + OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables. + +2014-09-03 Marek Polacek <polacek@redhat.com> + + Backport from trunk + PR fortran/62270 + * interface.c (compare_parameter): Fix condition. + +2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org> + + Backport from trunk + PR fortran/62214 + * gfortran.dg/array_assignment_5.f90: New test. + 2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org> Backport from trunk diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index 27729324cb7..7bbdac81b9e 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -874,6 +874,10 @@ optimize_binop_array_assignment (gfc_code *c, gfc_expr **rhs, bool seen_op) return true; break; + case INTRINSIC_CONCAT: + /* Do not do string concatenations. */ + break; + default: /* Binary operators. */ if (optimize_binop_array_assignment (c, &e->value.op.op1, true)) diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 725cd8a4b76..e38bb1f5d0b 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -1923,7 +1923,7 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual, /* F2008, 12.5.2.5; IR F08/0073. */ if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL && ((CLASS_DATA (formal)->attr.class_pointer - && !formal->attr.intent == INTENT_IN) + && formal->attr.intent != INTENT_IN) || CLASS_DATA (formal)->attr.allocatable)) { if (actual->ts.type != BT_CLASS) diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index 988dea92f58..53a78f08875 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -115,6 +115,16 @@ gfc_omp_predetermined_sharing (tree decl) if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl)) return OMP_CLAUSE_DEFAULT_SHARED; + /* These are either array or derived parameters, or vtables. + In the former cases, the OpenMP standard doesn't consider them to be + variables at all (they can't be redefined), but they can nevertheless appear + in parallel/task regions and for default(none) purposes treat them as shared. + For vtables likely the same handling is desirable. */ + if (TREE_CODE (decl) == VAR_DECL + && TREE_READONLY (decl) + && TREE_STATIC (decl)) + return OMP_CLAUSE_DEFAULT_SHARED; + return OMP_CLAUSE_DEFAULT_UNSPECIFIED; } |