File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ ! RUN: %flang_fc1 -cpp -DFILE1 -DFILE2 %s | FileCheck %s --allow-empty
2+ ! RUN: %flang_fc1 -cpp -DFILE1 %s | FileCheck %s --allow-empty
3+ ! RUN: %flang_fc1 -cpp -DFILE2 %s | FileCheck %s --allow-empty
4+
5+ ! CHECK-NOT: error
6+ ! CHECK-NOT: warning
7+
8+ #ifdef FILE1
9+ module m
10+ implicit none
11+ private
12+ public :: f1
13+ interface f1
14+ pure module function f1(n) result(res)
15+ integer , intent (in ) :: n
16+ integer :: res(max (n, 0 ))
17+ end function f1
18+ end interface f1
19+ end module m
20+ #endif
21+
22+ #ifdef FILE2
23+ submodule (m) sm
24+ implicit none
25+ contains
26+ pure module function f1(n) result(res)
27+ integer , intent (in ) :: n
28+ integer :: res(max (n, 0 ))
29+ res(:) = 0
30+ end function f1
31+ end submodule sm
32+ #endif
You can’t perform that action at this time.
0 commit comments