Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Type extension

John4
Valued Contributor I
428 Views

In the code below, I get some errors related to the structure constructor. Is it a compiler bug/ incomplete implementation of the type extension feature? Or Fortran 2003 requires nesting structure constructors up to the base type?

implicit none
type :: t1
integer :: a
end type
type, extends(t1) :: t2
integer :: b
end type
type(t2) :: t
t = t2(1, 1)
print *, t
end

0 Kudos
1 Solution
Steven_L_Intel1
Employee
428 Views
It's a bug/incomplete implementation. 11.1 (coming this week) compiles this ok.

View solution in original post

0 Kudos
1 Reply
Steven_L_Intel1
Employee
429 Views
It's a bug/incomplete implementation. 11.1 (coming this week) compiles this ok.
0 Kudos
Reply