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

Translated Array variable in test case for F90 has syntax error #76

Open
MengZhang opened this issue Apr 11, 2019 · 0 comments
Open

Translated Array variable in test case for F90 has syntax error #76

MengZhang opened this issue Apr 11, 2019 · 0 comments

Comments

@MengZhang
Copy link

Following is the input XML for translation, generated test case code, compiler error for the generated code and revision of code for passing the compiling.

*XML:
[5,5,10,10,20,20,40,40,0,0]

*Generated F90 test case code:
INTEGER:: NL
REAL, ALLOCATABLE, DIMENSION(NL) :: DLAYR
....
NL = 10
DLAYR = [5,5,10,10,20,20,40,40,0,0]

*Compiler error message:
REAL, ALLOCATABLE, DIMENSION(NL) :: DLAYR
1
Error: Explicit shaped array with nonconstant bounds at (1)

 DLAYR = [5,5,10,10,20,20,40,40,0,0]
1

Error: Incompatible ranks 0 and 1 in assignment at (1)

  • Revised code:
    REAL, DIMENSION(10) :: DLAYR = [5,5,10,10,20,20,40,40,0,0]
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