brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 932f3ef Raw
31 lines · plain
1!RUN: %flang_fc1 -cpp -DFILE1 -DFILE2 %s | FileCheck %s --allow-empty2!RUN: %flang_fc1 -cpp -DFILE1 %s | FileCheck %s --allow-empty && %flang_fc1 -cpp -DFILE2 %s | FileCheck %s --allow-empty3 4!CHECK-NOT: error5!CHECK-NOT: warning6 7#ifdef FILE18module function_with_max_result_extent_module9    implicit none10    public :: function_with_max_result_extent11  interface function_with_max_result_extent12    pure module function function_with_max_result_extent(n) result(res)13      integer, intent(in) :: n14      integer :: res(max(n, 0))15    end function function_with_max_result_extent16  end interface function_with_max_result_extent17end module function_with_max_result_extent_module18#endif19 20#ifdef FILE221submodule (function_with_max_result_extent_module) function_with_max_result_extent_submodule22  implicit none23contains24  pure module function function_with_max_result_extent(n) result(res)25      integer, intent(in) :: n26      integer :: res(max(n, 0))27      res(:) = 028    end function function_with_max_result_extent29end submodule function_with_max_result_extent_submodule30#endif31