Issue |
123090
|
Summary |
[flang] Incorrect diagnostic on component initialization using intrinsic function
|
Labels |
flang:frontend
|
Assignees |
|
Reporter |
DanielCChen
|
Consider the following code:
```
PROGRAM main
IMPLICIT NONE
TYPE :: DT
CHARACTER*(INT(ACOSD(0.5))) :: C=CHAR(INT(ACOSD(0.5)))
END TYPE
end
```
Flang currently issues an error as:
```
error: Semantic errors in a7.f
./a7.f:4:41: error: Must be a constant value
CHARACTER*(INT(ACOSD(0.5))) :: C=CHAR(INT(ACOSD(0.5)))
^^^^^^^^^^^^^^^^^^^^^
```
This seems wrong to me. All the intrinsic functions used in initialization can be folded at the compile time.
All of ifort, gfortran and XLF compile the above code successfully.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs