OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [operator_5.f90] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-c" }
3
 
4
MODULE mod_t
5
  type :: t
6
    integer :: x
7
  end type
8
 
9
  ! user defined operator
10
  INTERFACE OPERATOR(.FOO.)
11
    MODULE PROCEDURE t_foo
12
  END INTERFACE
13
 
14
  INTERFACE OPERATOR(.FOO.)
15
    MODULE PROCEDURE t_foo                  ! { dg-error "already present" }
16
  END INTERFACE
17
 
18
  INTERFACE OPERATOR(.FOO.)
19
    MODULE PROCEDURE t_bar                  ! { dg-error "Ambiguous interfaces" }
20
  END INTERFACE
21
 
22
  ! intrinsic operator
23
  INTERFACE OPERATOR(==)
24
    MODULE PROCEDURE t_foo
25
  END INTERFACE
26
 
27
  INTERFACE OPERATOR(.eq.)
28
    MODULE PROCEDURE t_foo                  ! { dg-error "already present" }
29
  END INTERFACE
30
 
31
  INTERFACE OPERATOR(==)
32
    MODULE PROCEDURE t_bar                  ! { dg-error "Ambiguous interfaces" }
33
  END INTERFACE
34
 
35
  INTERFACE OPERATOR(.eq.)
36
    MODULE PROCEDURE t_bar                  ! { dg-error "already present" }
37
  END INTERFACE
38
 
39
CONTAINS
40
  LOGICAL FUNCTION t_foo(this, other)
41
    TYPE(t), INTENT(in) :: this, other
42
    t_foo = .FALSE.
43
  END FUNCTION
44
 
45
  LOGICAL FUNCTION t_bar(this, other)
46
    TYPE(t), INTENT(in) :: this, other
47
    t_bar = .FALSE.
48
  END FUNCTION
49
END MODULE
50
 
51
! { dg-final { cleanup-modules "mod_t" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.