https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52994

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid

--- Comment #14 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #13)
> > FYI : On my environment it's not possible to produce an ICE with gcc-9
> > and several tested combinations of options / all tested configurations.

Confirmed, the ICE is gone since gfortran 6.


> > $ gfortran-9-20181021 -c pr52994.f90
> > pr52994.f90:43:29:
> >
> >    43 |   a%left_halo(psi%arr) = -666
> >       |                             1
> > Error: Different types in pointer assignment at (1); attempted assignment
> > of REAL(4) to INTEGER(4)
> 
> Note that I am surprised by the order of REAL(4) and INTEGER(4): AFAICT
> a%left_halo(psi%arr) is real and -666 an integer, isn't it?

The bigger problem is that the mentioned statement is not actually a pointer
assignment. left_halo returns a pointer, but the assignment concerns the target
of that pointer, not the pointer itself.

When changing to a real value, I get:

   32 |   a%left_halo(arr) = -666.
      |                          1
Error: Different ranks in pointer assignment at (1)


Also this error is bogus. The assignment is valid AFAICS.

Reply via email to