- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is default initialization in base types supposed to work with derived types in the current compiler? I'm getting weird error messages: not those defined in type(t).
[fortran]program C3 type :: t integer :: x=0, y=1 end type t type, extends(t) :: t1 integer :: z end type t1 type(t) :: v0 = t(y=1) !ok, default initializer for x type(t1) :: v1 = t1(x=0, y=1, z=5) !ok, explicit type(t1) :: v2 = t1(t=t(x=1, y=2), z=5) !ok, explicit base type(t1) :: v3 = t1(z=3) ! error #8212: Omitted field is not initialized. Field initialization missing:Note the error message refers toend program C3[/fortran]
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting. I know we had some issues with default initialization before, but this is a new one. I'll report it (DPD200156822). Thanks.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting. I know we had some issues with default initialization before, but this is a new one. I'll report it (DPD200156822). Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I expect this issue to be fixed in our November release.
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