[PATCH, v2, OpenMP, Fortran] Support in_reduction for Fortran

2021-10-19 Thread Chung-Lin Tang
Hi Jakub, On 2021/9/18 12:11 AM, Jakub Jelinek wrote: @@ -3496,7 +3509,8 @@ static match match_omp (gfc_exec_op op, const omp_mask mask) { gfc_omp_clauses *c; - if (gfc_match_omp_clauses (&c, mask) != MATCH_YES) + if (gfc_match_omp_clauses (&c, mask, true, true, false, +

[Patch, committed] Fortran: Fix "str" to scalar descriptor conversion [PR92482]

2021-10-19 Thread Tobias Burnus
Here, the problem is that the param.expr was: &"abc" -> type: "char*" as that's an ADDR_EXPR, the previous code dereferrenced it: *&"abc" -> type *(char*) but that's the type 'char'. Thus, at the end, the result was scalar = 'a' -> type char instead of scalar "abc" -> type char array of s

Re: [PATCH, v2, OpenMP, Fortran] Support in_reduction for Fortran

2021-10-19 Thread Jakub Jelinek via Fortran
On Tue, Oct 19, 2021 at 09:03:06PM +0800, Chung-Lin Tang wrote: > 2021-10-19 Chung-Lin Tang > > gcc/fortran/ChangeLog: > > * openmp.c (gfc_match_omp_clause_reduction): Add 'openmp_target' default > false parameter. Add 'always,tofrom' map for OMP_LIST_IN_REDUCTION case. > (gf

[Patch, committed] Fortran: Fix 'fn spec' for deferred character length (was: Re: [r12-4457 Regression] FAIL: gfortran.dg/deferred_type_param_6.f90 -Os execution test on Linux/x86_64)

2021-10-19 Thread Tobias Burnus
On 16.10.21 20:54, Jan Hubicka wrote: I wrote: Fortran has for a long time 'character(len=5), allocatable" or "character(len=*)". In the first case, the "5" can be ignored as both caller and callee know the length. In the second case, the length is determined by the argument, but it cannot be ch

gfortran.dg/bind-c-contiguous-5.c: Big-endian fix [PR102815]

2021-10-19 Thread Tobias Burnus
Endian fix – but not well tested on big endian - hence, reports whether it now passes are highly welcome (thanks!). Committed as r12-4528-gd4044db034b40c275b5f287d5854a102d22e07c0 Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Ges