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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Tests fix for PR26107 in which an ICE would occur after the second
3
! error message below.  This resulted from a spurious attempt to
4
! produce the third error message, without the name of the function.
5
!
6
! This is an expanded version of the testcase in the PR.
7
!
8
   pure function equals(self, &     ! { dg-error "must be INTENT" }
9
                        string, ignore_case) result(same)
10
         character(*), intent(in) :: string
11
         integer(4), intent(in) :: ignore_case
12
         integer(4) :: same
13
         if (len (self) < 1) return ! { dg-error "must be CHARACTER" }
14
         same = 1
15
   end function
16
 
17
   function impure(self) result(ival)
18
         character(*), intent(in) :: self
19
         ival = 1
20
   end function
21
 
22
   pure function purity(self, string, ignore_case) result(same)
23
         character(*), intent(in) :: self
24
         character(*), intent(in) :: string
25
         integer(4), intent(in) :: ignore_case
26
         integer i
27
         if (end > impure (self)) & ! { dg-error "non-PURE procedure" }
28
           return
29
   end function

powered by: WebSVN 2.1.0

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