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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [class_20.f03] - Blame information for rev 739

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 44044: [OOP] SELECT TYPE with class-valued function
4
! comment #1
5
!
6
! Note: All three error messages are being checked for double occurrence,
7
!       using the trick from PR 30612.
8
!
9
! Contributed by Janus Weil 
10
 
11
 
12
implicit none
13
 
14
type :: t
15
end type
16
 
17
type :: s
18
  sequence
19
end type
20
 
21
contains
22
 
23
  function fun()  ! { dg-bogus "must be dummy, allocatable or pointer.*must be dummy, allocatable or pointer" }
24
    class(t) :: fun
25
  end function
26
 
27
  function fun2()  ! { dg-bogus "cannot have a deferred shape.*cannot have a deferred shape" }
28
    integer,dimension(:) :: fun2
29
  end function
30
 
31
  function fun3() result(res)  ! { dg-bogus "is not extensible.*is not extensible" }
32
    class(s),pointer :: res
33
  end function
34
 
35
end
36
 
37
 
38
! { dg-error "must be dummy, allocatable or pointer" "" { target *-*-* } 23 }
39
! { dg-error "cannot have a deferred shape"          "" { target *-*-* } 27 }
40
! { dg-error "is not extensible"                     "" { target *-*-* } 31 }

powered by: WebSVN 2.1.0

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