[AMDGPU] Test codegen'ing True16 additions.
[llvm-project.git] / flang / test / Semantics / generic07.f90
blob885697e4b5a97835d88389a4bea4d98a5078fc64
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 module m
3 type :: t1
4 sequence
5 real :: x
6 end type
7 type :: t2
8 sequence
9 real :: x
10 end type
11 type :: t3
12 real :: x
13 end type
14 type :: t4
15 real, private :: x
16 end type
17 contains
18 subroutine s1a(x)
19 type(t1), intent(in) :: x
20 end
21 subroutine s2a(x)
22 type(t2), intent(in) :: x
23 end
24 subroutine s3a(x)
25 type(t3), intent(in) :: x
26 end
27 subroutine s4a(x)
28 type(t4), intent(in) :: x
29 end
30 end
32 program test
33 use m, only: s1a, s2a, s3a, s4a
34 type :: t1
35 sequence
36 integer :: x ! distinct type
37 end type
38 type :: t2
39 sequence
40 real :: x
41 end type
42 type :: t3 ! no SEQUENCE
43 real :: x
44 end type
45 type :: t4
46 real :: x ! not PRIVATE
47 end type
48 interface distinguishable1
49 procedure :: s1a, s1b
50 end interface
51 interface distinguishable2
52 procedure :: s1a, s1b
53 end interface
54 interface distinguishable3
55 procedure :: s1a, s1b
56 end interface
57 !ERROR: Generic 'indistinguishable' may not have specific procedures 's2a' and 's2b' as their interfaces are not distinguishable
58 interface indistinguishable
59 procedure :: s2a, s2b
60 end interface
61 contains
62 subroutine s1b(x)
63 type(t1), intent(in) :: x
64 end
65 subroutine s2b(x)
66 type(t2), intent(in) :: x
67 end
68 subroutine s3b(x)
69 type(t3), intent(in) :: x
70 end
71 subroutine s4b(x)
72 type(t4), intent(in) :: x
73 end
74 end