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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! PR fortran/45786 - operators were not correctly marked as public
3
! if the alternative form was used.
4
! Test case contributed by Neil Carlson.
5
module foo_type
6
  private
7
  public :: foo, operator(==)
8
  type :: foo
9
    integer :: bar
10
  end type
11
  interface operator(.eq.)
12
    module procedure eq_foo
13
  end interface
14
contains
15
  logical function eq_foo (a, b)
16
    type(foo), intent(in) :: a, b
17
    eq_foo = (a%bar == b%bar)
18
  end function
19
end module
20
 
21
 subroutine use_it (a, b)
22
  use foo_type
23
  type(foo) :: a, b
24
  print *, a == b
25
end subroutine
26
 
27
! { dg-final { cleanup-modules "foo_type" } }

powered by: WebSVN 2.1.0

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