Quantcast
Channel: Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2583

yet another bug(??) in parameterized derived types

$
0
0

Hi  there

the code

Module testmod
  Type, abstract :: myroot(k)
    Integer(4), kind :: k
  End type myroot
  Type, extends(myroot), abstract :: myvec(lb1,ub1)
    Integer(8), len :: lb1=1,ub1
  End type myvec
  Type, extends(myvec) :: myvec_int
    Integer(k) :: val(lb1:ub1)
  End type myvec_int
End Module testmod
Program Test
  use testmod
  Implicit none
  Type(myvec_int(8,:,:)), allocatable :: a
  Allocate(myvec_int(8,ub1=5)::a)
  a%lb1=6
End Program Test

compiles with 17.05, 18.0 and 18.0.1, where from my understanding "a%lb1=6" should yield a compile time error. Is that correct??

Cheers


Viewing all articles
Browse latest Browse all 2583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>