Open
Description
A very large storage sequence (2**30 x 4-byte elements) in a common block leads to segmentation fault at runtime.
The below program works fine in gfortran,classic-flang and ifort but fails on llvm-flang : https://godbolt.org/z/YxP7P73rq
Program test_storage_seq_big
Integer, Parameter :: sz = 2**30
Real :: x(sz)
Common/comm/x
Print *,sz
x(1:2000) = 42
x(sz-2) = -99
Call diff
Print '("ok")'
Contains
Subroutine diff
Real :: y(sz)
Common/comm/y
Print '(f8.1)', y(sz-2)
End Subroutine diff
End Program test_storage_seq_big