Re: [PATCH] PR fortran/101565 - ICE in gfc_simplify_image_index, at fortran/simplify.c:8234

2021-11-30 Thread Mikael Morin
Hello, Le 29/11/2021 à 22:31, Harald Anlauf via Fortran a écrit : Dear all, a trivial one: we need to check the type of the SUB argument to the coarray IMAGE_INDEX intrinsic. It has to be an array of type integer. Patch by Steve Kargl. I hope at some point he’ll finally come to a working gi

Re: [PATCH] PR fortran/103473 - [11/12 Regression] ICE in simplify_minmaxloc_nodim, at fortran/simplify.c:5287

2021-11-30 Thread Mikael Morin
Le 29/11/2021 à 23:01, Harald Anlauf via Fortran a écrit : Dear all, another trivial and obvious one, discovered by Gerhard. We can have a NULL pointer dereference simplifying MINLOC/MAXLOC on an array that was not properly declared. OK for mainline / affected 11-branch after regtesting comple

Re: [gomp4] Make OpenACC orphan gang reductions errors

2021-11-30 Thread Thomas Schwinge
Hi! On 2017-05-01T18:27:59-0700, Cesar Philippidis wrote: > This patch promotes all OpenACC gang reductions on orphan loops as > errors. Accord to the spec, orphan loops are those which are not > lexically nested inside an OpenACC parallel or kernels regions. I.e., > acc loops inside acc routines

Re: [gomp4] Make OpenACC orphan gang reductions errors

2021-11-30 Thread Thomas Schwinge
Hi! On 2017-05-01T18:27:59-0700, Cesar Philippidis wrote: > --- a/gcc/fortran/openmp.c > +++ b/gcc/fortran/openmp.c > @@ -6090,6 +6090,18 @@ resolve_oacc_loop_blocks (gfc_code *code) > + if (code->op == EXEC_OACC_LOOP > + && code->ext.omp_clauses->lists[OMP_LIST_REDUCTION] > + && code

Re: [PATCH] [og10] libgomp, Fortran: Fix OpenACC "gang reduction on an orphan loop" error message

2021-11-30 Thread Thomas Schwinge
Hi! On 2020-07-20T12:26:48+0200, Frederik Harwath wrote: > Thomas Schwinge writes: >>> Can I include the patch in OG10? > This has been delayed a bit by my vacation, but I have now committed > the patch. >> (Ideally, we'd also test 'serial' construct in addition to 'kernels', >> 'parallel' >

Re: [gomp4] Make OpenACC orphan gang reductions errors

2021-11-30 Thread Thomas Schwinge
Hi! On 2017-05-01T18:27:59-0700, Cesar Philippidis wrote: > gcc/c/ > * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan OpenACC > gang reductions. > > gcc/cp/ > * semantics.c (finish_omp_clauses): Emit an error on orphan OpenACC > gang reductions. > >

Re: [PATCH] Avoid some -Wunreachable-code-ctrl

2021-11-30 Thread Mikael Morin
Le 29/11/2021 à 16:03, Richard Biener via Gcc-patches a écrit : diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index f5ba7cecd54..16ee2afc9c0 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -5229,7 +5229,6 @@ gfc_expr_walker (gfc_expr

Re: [PATCH] Avoid some -Wunreachable-code-ctrl

2021-11-30 Thread Richard Biener via Fortran
On Tue, 30 Nov 2021, Mikael Morin wrote: > Le 29/11/2021 à 16:03, Richard Biener via Gcc-patches a écrit : > > diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c > > index f5ba7cecd54..16ee2afc9c0 100644 > > --- a/gcc/fortran/frontend-passes.c > > +++ b/gcc/fortran/frontend

Re: [PATCH] Avoid some -Wunreachable-code-ctrl

2021-11-30 Thread Mikael Morin
On 30/11/2021 14:25, Richard Biener wrote: On Tue, 30 Nov 2021, Mikael Morin wrote: Le 29/11/2021 à 16:03, Richard Biener via Gcc-patches a écrit : diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index f5ba7cecd54..16ee2afc9c0 100644 --- a/gcc/fortran/frontend-passes

Re: [PATCH] Avoid some -Wunreachable-code-ctrl

2021-11-30 Thread Richard Biener via Fortran
On Tue, 30 Nov 2021, Mikael Morin wrote: > On 30/11/2021 14:25, Richard Biener wrote: > > On Tue, 30 Nov 2021, Mikael Morin wrote: > > > >> Le 29/11/2021 ? 16:03, Richard Biener via Gcc-patches a ?crit : > >>> diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c > >>> index

[power-ieee128] What should the math functions be annotated with?

2021-11-30 Thread Thomas Koenig via Fortran
Hi, looking at the head of a generated gfortran library math function, for example bessel_r16.c, #if defined(GFC_REAL_16_IS_FLOAT128) #define MATHFUNC(funcname) funcname ## q #else #define MATHFUNC(funcname) funcname ## l #endif So (I suppose I can unravel the m4 code to generate this:-) what

Re: [PATCH, Fortran] Fix setting of array lower bound for named arrays

2021-11-30 Thread Tobias Burnus
On 29.11.21 22:11, Harald Anlauf wrote: "A whole array is a named array or a structure component whose final part-ref is an array component name; no subscript list is appended." I think in "h(3)" there is not really a named array – thus I read it as if the "Otherwise ... result value is 1" appl

Re: [PATCH] PR fortran/101565 - ICE in gfc_simplify_image_index, at fortran/simplify.c:8234

2021-11-30 Thread Harald Anlauf via Fortran
Hi Mikael, Am 30.11.21 um 12:25 schrieb Mikael Morin: Hello, Le 29/11/2021 à 22:31, Harald Anlauf via Fortran a écrit : Dear all, a trivial one: we need to check the type of the SUB argument to the coarray IMAGE_INDEX intrinsic.  It has to be an array of type integer. Patch by Steve Kargl.

Re: [PATCH, Fortran] Fix setting of array lower bound for named arrays

2021-11-30 Thread Harald Anlauf via Fortran
Hi Tobias, Am 30.11.21 um 18:24 schrieb Tobias Burnus: On 29.11.21 22:11, Harald Anlauf wrote: "A whole array is a named array or a structure component whose final part-ref is an array component name; no subscript list is appended." I think in "h(3)" there is not really a named array – thus I

Re: [PATCH, Fortran] Fix setting of array lower bound for named arrays

2021-11-30 Thread Toon Moene
On 11/30/21 8:54 PM, Harald Anlauf via Fortran wrote: Hi Tobias, You seem to be quite convinced with your interpretation, while I am simply confused. If both compiler developers are confused, and actual compiler implementations differ in their outcomes of the test case, IMNSHO it is time

Re: [PATCH, fortran] Improve expansion of constant array expressions within constructors

2021-11-30 Thread Mikael Morin
Hello, On 27/11/2021 21:56, Harald Anlauf via Fortran wrote: diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index 6552eaf3b0c..fbc66097c80 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -1804,6 +1804,12 @@ expand_constructor (gfc_constructor_base base) if (empty_con