File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ include(testing)
55
66project (intel-bugs Fortran)
77
8+ add_compiler_test(SOURCES intel-20191229.f90 RUN_ONLY)
89add_compiler_test(SOURCES intel-20191228.f90)
910add_compiler_test(SOURCES intel-20190909.f90 COMPILE_ONLY)
1011add_compiler_test(SOURCES intel-20190903b.f90 COMPILE_ONLY)
Original file line number Diff line number Diff line change 1+ ! ! ALLOCATES LHS ARRAY WITH WRONG BOUNDS
2+ ! !
3+ ! ! This is totally f*cked up. LHS allocatable array Z is not allocated
4+ ! ! with the bounds of Y, but with the bounds of the actual argument X.
5+ ! ! Affects 18.0.5 and 19.0.5
6+ ! !
7+ ! ! $ ifort --version
8+ ! ! ifort (IFORT) 19.0.5.281 20190815
9+ ! ! $ ifort intel-20191229.f90
10+ ! ! $ ./a.out
11+ ! ! 2
12+ ! !
13+
14+ real , allocatable :: x(:)
15+ allocate (x(- 2 :0 ))
16+ call foo(x)
17+ contains
18+ subroutine foo (y )
19+ real , intent (in ) :: y(:)
20+ real , allocatable :: z(:)
21+ if (lbound (y,1 ) /= 1 ) stop 1
22+ z = y ! <== Z IS NOT ALLOCATED WITH THE CORRECT BOUNDS!
23+ if (lbound (z,1 ) /= lbound (y,1 )) stop 2 ! <== EXITS HERE
24+ end subroutine
25+ end
You can’t perform that action at this time.
0 commit comments