File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-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-20200721.f90 COMPILE_ONLY)
89add_compiler_test(SOURCES intel-20200213.f90 RUN_ONLY PASS_REGULAR_EXPRESSION "COP" )
910add_compiler_test(SOURCES intel-20200125.f90 RUN_ONLY)
1011add_compiler_test(SOURCES intel-20191229.f90 RUN_ONLY)
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments