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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [proc_ptr_comp_20.f90] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do compile }
! { dg-do compile }
!
!
! PR 40869: [F03] PPC assignment checking
! PR 40869: [F03] PPC assignment checking
!
!
! Contributed by Janus Weil 
! Contributed by Janus Weil 
implicit none
implicit none
interface func
interface func
  procedure f1,f2 ! { dg-error "Ambiguous interfaces" }
  procedure f1,f2 ! { dg-error "Ambiguous interfaces" }
end interface
end interface
interface operator(.op.)
interface operator(.op.)
  procedure f1,f2 ! { dg-error "Ambiguous interfaces" }
  procedure f1,f2 ! { dg-error "Ambiguous interfaces" }
end interface
end interface
type :: t1
type :: t1
  procedure(integer), pointer, nopass :: ppc
  procedure(integer), pointer, nopass :: ppc
end type
end type
type :: t2
type :: t2
  procedure(real), pointer, nopass :: ppc
  procedure(real), pointer, nopass :: ppc
end type
end type
type(t1) :: o1
type(t1) :: o1
type(t2) :: o2
type(t2) :: o2
procedure(logical),pointer :: pp1
procedure(logical),pointer :: pp1
procedure(complex),pointer :: pp2
procedure(complex),pointer :: pp2
pp1 => pp2        ! { dg-error "Type/kind mismatch" }
pp1 => pp2        ! { dg-error "Type/kind mismatch" }
pp2 => o2%ppc     ! { dg-error "Type/kind mismatch" }
pp2 => o2%ppc     ! { dg-error "Type/kind mismatch" }
o1%ppc => pp1     ! { dg-error "Type/kind mismatch" }
o1%ppc => pp1     ! { dg-error "Type/kind mismatch" }
o1%ppc => o2%ppc  ! { dg-error "Type/kind mismatch" }
o1%ppc => o2%ppc  ! { dg-error "Type/kind mismatch" }
contains
contains
  real function f1(a,b)
  real function f1(a,b)
    real,intent(in) :: a,b
    real,intent(in) :: a,b
    f1 = a + b
    f1 = a + b
  end function
  end function
  integer function f2(a,b)
  integer function f2(a,b)
    real,intent(in) :: a,b
    real,intent(in) :: a,b
    f2 = a - b
    f2 = a - b
  end function
  end function
end
end
 
 

powered by: WebSVN 2.1.0

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