Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal component initialization in pdt_27.f03 #13

Open
nncarlson opened this issue Jan 31, 2018 · 0 comments
Open

Illegal component initialization in pdt_27.f03 #13

nncarlson opened this issue Jan 31, 2018 · 0 comments

Comments

@nncarlson
Copy link
Owner

The default initialization of component foo is illegal in

 8:  type :: vec(k)
 9:     integer, len :: k=3
10:     integer :: foo(k)=[1,2,3]
11:  end type vec

as it violates C458 (F08) or C463 (F18). The NAG 6.1 compiler reports this error:

$ nagfor -kind=byte pdt_27.f03
NAG Fortran Compiler Release 6.1(Tozai) Build 6144
Questionable: pdt_27.f03, line 10: Shape of component FOO of type VEC depends on a kind type parameter but its default value has fixed shape
Error: pdt_27.f03, line 10: Type VEC default-initialised component FOO has a non-constant array bound
@nncarlson nncarlson reopened this Feb 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant