PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / generic_16.f90
blobcb6e34df554e43e1fb16b893790a34a04f9588fa
1 ! { dg-do compile }
2 ! PR35478 internal compiler error: Segmentation fault
3 MODULE auxiliary
4 IMPLICIT NONE
5 INTEGER, PARAMETER, PRIVATE :: dp = SELECTED_REAL_KIND(15)
6 INTERFACE median
7 MODULE PROCEDURE R_valmed, I_valmed, D_valmed
8 END INTERFACE
9 PUBLIC :: median
10 PRIVATE :: R_valmed, I_valmed, D_valmed
11 CONTAINS
12 RECURSIVE FUNCTION D_valmed (XDONT) RESULT (res_med)
13 Real (kind=dp), Dimension (:), Intent (In) :: XDONT
14 Real (kind=dp) :: res_med
15 res_med = 0.0d0
16 END FUNCTION D_valmed
17 RECURSIVE FUNCTION R_valmed (XDONT) RESULT (res_med)
18 Real, Dimension (:), Intent (In) :: XDONT
19 Real :: res_med
20 res_med = 0.0
21 END FUNCTION R_valmed
22 RECURSIVE FUNCTION I_valmed (XDONT) RESULT (res_med)
23 Integer, Dimension (:), Intent (In) :: XDONT
24 Integer :: res_med
25 res_med = 0
26 END FUNCTION I_valmed
27 END MODULE auxiliary
28 PROGRAM main
29 USE auxiliary
30 IMPLICIT NONE
31 INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(15)
32 REAL(kind=dp) :: rawData(2), data, work(3)
33 data = median(rawData, work) ! { dg-error "no specific function" }
34 END PROGRAM main