aomp
aomp copied to clipboard
Implied shape only partially implemented
Hello,
the following code compiles and works fine with GNU, Intel, NVIDIA, and NAG.
It is however not fully working with flang-12 or flang-13 that comes with AMD ROCm:
integer, parameter :: list1() = [1,2] ! ok character(1), parameter :: gnss1() = ["G","R","E","C"] ! ok integer, parameter :: list2(42:) = [1,2] ! fails character(1), parameter :: gnss2(401:) = ["G","R","E","C"] ! fails print *, gnss2 end
This is what I get with
AMD clang version 12.0.0 (CLANG: AOCC_3_1_0-Build#126 2021_06_07) (based on LLVM Mirror.Version.12.0.0) Target: x86_64-unknown-linux-gnu
% flang implied-shape.f90 F90-S-0084-Illegal use of symbol list2 - a named constant array must have constant extents (implied-shape.f90: 3) F90-S-0000-Internal compiler error. mk_id: invalid symbol table index 0 (implied-shape.f90: 3) F90-S-0000-Internal compiler error. sym_of_ast: unexpected ast 41 (implied-shape.f90: 3) F90-S-0084-Illegal use of symbol gnss2 - a named constant array must have constant extents (implied-shape.f90: 4) F90-S-0000-Internal compiler error. mk_id: invalid symbol table index 0 (implied-shape.f90: 4) F90-S-0000-Internal compiler error. sym_of_ast: unexpected ast 41 (implied-shape.f90: 4) 0 inform, 0 warnings, 6 severes, 0 fatal for MAIN
It would be nice to have this available in a future release.
Thanks, Harald