- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think the code
program implied_do_declaration
implicit none
integer, allocatable :: vec(:)
vec = [(2*i, integer :: i=1,3)]
print*,vec ! 2 4 6
end program implied_do_declaration
is valid Fortran 2018 but Intel Fortran says
ifort -standard-semantics -stand:f18 implied_do.f90
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.5.0 Build 20211109_000000
Copyright (C) 1985-2021 Intel Corporation. All rights reserved.
implied_do.f90(4): error #6404: This name does not have a type, and must have an explicit type. [I]
vec = [(2*i, integer :: i=1,3)]
------------------------^
compilation aborted for implied_do.f90 (code 1)
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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