Menu

#48 ROSE: unparses array assignment incorrectly

incorrect
open
ROSE (12)
5
2011-01-05
2011-01-05
No

The following program fails to unparse correctly:

integer, parameter :: MAX_DEBUG = 50
INTEGER, SAVE :: define_kind_debug = 0
integer, save :: define_kind_i (MAX_DEBUG) = 0
real, save :: define_kind_r8(MAX_DEBUG) = 0.0

end

---------

Additional information:

rose_define_kind.f90:76.52:

INTEGER, DIMENSION(MAX_DEBUG), SAVE :: define_kind_i = (/0/)
1
Error: Different shape for array assignment at (1) on dimension 1 (50 and 1)
rose_define_kind.f90:77.62:

REAL(kind=REAL8), DIMENSION(MAX_DEBUG), SAVE :: define_kind_r8 = (/ZERO/)
1
Error: Different shape for array assignment at (1) on dimension 1 (50 and 1)
Undefined symbols:
"_main", referenced from:
start in crt1.10.5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
pn1169315:xrage apittman$ testTranslator -c define_kind.f90
rose_define_kind.f90:76.52:

INTEGER, DIMENSION(MAX_DEBUG), SAVE :: define_kind_i = (/0/)
1
Error: Different shape for array assignment at (1) on dimension 1 (50 and 1)
rose_define_kind.f90:77.62:

REAL(kind=REAL8), DIMENSION(MAX_DEBUG), SAVE :: define_kind_r8 = (/ZERO/)
1
Error: Different shape for array assignment at (1) on dimension 1 (50 and 1)

***

INTEGER, SAVE :: define_kind_debug = 0
!APITTMAN: leads to rose error
!integer , save :: define_kind_i (MAX_DEBUG) = 0
INTEGER, DIMENSION(MAX_DEBUG), SAVE :: define_kind_i
!APITTMAN: leads to rose error
!real(REAL8), save :: define_kind_r8(MAX_DEBUG) = ZERO
REAL(kind=REAL8), DIMENSION(MAX_DEBUG), SAVE :: define_kind_r8
CONTAINS

Discussion


Log in to post a comment.