Skip to content

Commit f60d1c2

Browse files
committed
New Intel bug test case
1 parent 7fc72be commit f60d1c2

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

intel-bugs/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ include(testing)
55

66
project(intel-bugs Fortran)
77

8+
add_compiler_test(SOURCES intel-20200721.f90 COMPILE_ONLY)
89
add_compiler_test(SOURCES intel-20200213.f90 RUN_ONLY PASS_REGULAR_EXPRESSION "COP")
910
add_compiler_test(SOURCES intel-20200125.f90 RUN_ONLY)
1011
add_compiler_test(SOURCES intel-20191229.f90 RUN_ONLY)

intel-bugs/intel-20200721.f90

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
!! Support request 04744494
2+
!!
3+
!! VALID CODE REJECTED
4+
!!
5+
!! In the following example DUMMY%STATE is a valid argument to the
6+
!! STORAGE_SIZE intrinsic function. Neither the allocatable DUMMY
7+
!! variable nor its allocatable component STATE need to be allocated;
8+
!! the result depends only on the type of STATE which is known.
9+
!!
10+
!! $ ifort --version
11+
!! ifort (IFORT) 19.1.0.166 20191121
12+
!!
13+
!! $ ifort intel-20200721.f90
14+
!! intel-20200721.f90(16): error #8484: The argument to STORAGE_SIZE is invalid. [STATE]
15+
!! integer, parameter :: n = storage_size(dummy%state)
16+
!! -----------------------------------------------^
17+
!! compilation aborted for intel-20200721.f90 (code 1)
18+
!!
19+
20+
module mod
21+
type :: foo
22+
integer, allocatable :: state(:)
23+
end type
24+
type(foo), allocatable :: dummy
25+
integer, parameter :: n = storage_size(dummy%state)
26+
end module

0 commit comments

Comments
 (0)