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

--- Comment #3 from Adam Hirst <adam at aphirst dot karoo.co.uk> ---
In reference to my initial attachment 43173, and by adding the following
annotations:

```
  ! case 1
  M = v_array_par(1)%MyFunc()
  print *, M

  ! case 2
  M = v_scalar_par%MyFunc()
  print *, M

  ! case 3
  v_array(1) = MyType(1)
  M = v_array(1)%MyFunc()
  print *, M
```

I would like to make clear the current status in gcc (GCC) 8.2.1 20180831

1) Case 1 only uncommented, compilation fails:

```
gfortran -fcheck=bounds -Wall -Wextra -Og -g -c "attachment2.f90" (in
directory: /tmp)
attachment2.f90:26:47:
   type(MyType), parameter :: v_array_par(1) = [ MyType(1) ]
                                               1
Error: Can't convert TYPE(mytype) to REAL(4) at (1)
Compilation failed.
```

2) Case 2 only uncommented, works, gives expected result.

3) Case 3 only uncommented, works, gives expected result.


So it seems that the problem with the Bound Procedure only occurs when the
PARAMETER variable of derived type is array, not scalar.

Reply via email to