Issue |
138899
|
Summary |
[flang] Missing diagnostic on non-simply-contiguous actual to POINTER CONTIGUOUS dummy
|
Labels |
flang:frontend
|
Assignees |
|
Reporter |
DanielCChen
|
Consider the following code:
```
PROGRAM main
IMPLICIT NONE
INTEGER, TARGET :: T3(100)
INTEGER, POINTER :: P3(:)
P3 => T3(1:100:2) !<--- not simply contiguous: invalid
CALL sub(P3)
CONTAINS
SUBROUTINE sub(Arg)
INTEGER, POINTER, CONTIGUOUS :: Arg(:)
END SUBROUTINE sub
END
```
Flang compiles successfully. However the standard requires a diagnostic on this case as:
```
C1550 The actual argument corresponding to a dummy pointer with the CONTIGUOUS attribute shall be simply contiguous (9.5.4).
```
All ifort, gfortran and XLF issues an error.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs