- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[fortran]program C2 type t end type t type, extends (t) :: t1 integer :: i end type t1 type(t1) :: b = t1(5) end program C2[/fortran]
Compiling with Intel Visual Fortran 11.1.065 [IA-32]...
sandbox.f90
fortcom: Fatal: There has been an internal compiler error (C0000005).
This doesn't seem to violate the restrictions on empty types called out in the release notes. The internal compiler error goes away if the base type is not empty and the structure constructor contains an initializer for it.
3.5.4 Limited Support for Empty Derived Types
Fortran 2003 adds the ability to declare a derived type with no data components. The Intel
compiler has limited support for these in the current release. These limitations will be lifted in a
future release of the compiler. The limitations are as follows:
When an object of derived type is declared, the type must have at least one data
component. Extending an empty type is supported. For example:
type t
end type
type, extends (t) :: t1
end type
type, extends (t1) :: t2
integer i
end type
type, extends (t2) :: t3
end type
type (t) :: rec1 ! Not supported, type t is empty
type (t1) :: rec2 ! Not supported, type t1 is empty
type (t2) :: rec3 ! Supported, type t2 is not empty
type (t3) :: rec4 ! Supported, type t3 is not empty
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. I can reproduce this and will report it to the developers. Issue ID is DPD200156821.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. I can reproduce this and will report it to the developers. Issue ID is DPD200156821.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is expected to be fixed in the next major release of the compiler, scheduled for November.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page