OSDN Git Service

* config/i386/i386.md (UNSPEC_VSIBADDR): New.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / operator_2.f90
1 ! { dg-do compile }
2 ! Test that we can't override intrinsic operators in invalid ways
3 module foo
4
5  interface operator(*)
6   module procedure f1 ! { dg-error "conflicts with intrinsic interface" }
7  end interface
8
9  interface operator(>)
10    module procedure f2 ! { dg-error "conflicts with intrinsic interface" }
11  end interface
12
13  interface operator(/)
14   module procedure f3
15  end interface
16
17 contains
18
19  function f1(a,b) result (c)
20   integer, intent(in) :: a
21   integer, dimension(:), intent(in)   :: b
22   integer, dimension(size(b,1))   :: c
23   c = 0
24  end function f1
25
26  function f2(a,b)
27    character(len=*), intent(in) :: a
28    character(len=*), intent(in) :: b
29    logical :: f2
30    f2 = .false.
31  end function f2
32
33  function f3(a,b) result (c)
34   integer, dimension(:,:), intent(in) :: a
35   integer, dimension(:), intent(in)   :: b
36   integer, dimension(size(b,1))   :: c
37   c = 0
38  end function f3
39
40 end
41 ! { dg-final { cleanup-modules "foo" } }