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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [argument_checking_8.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 run }
2
! PR31306 ICE with implicit character variables
3
! Test case from PR and prepared by Jerry DeLisle 
4
module cyclic
5
 implicit none
6
 contains
7
   character(10) function ouch(x,y)
8
     implicit character(len(ouch)) (x)
9
     implicit character(len(x)+1) (y)
10
     intent(in) x,y
11
     integer i
12
     do i = 1, len(ouch)
13
        ouch(i:i) = achar(ieor(iachar(x(i:i)),iachar(y(i:i))))
14
     end do
15
   end function ouch
16
end module cyclic
17
 
18
program test
19
  use cyclic
20
  implicit none
21
  character(10) astr
22
  integer i
23
  write(astr,'(a)') ouch('YOW!      ','jerry      ')
24
  if (astr(1:5) /= "3*%SY") call abort
25
  do i=6,10
26
    if (astr(i:i) /= achar(0)) call abort
27
  end do
28
end program test
29
! { dg-final { cleanup-modules "cyclic" } }

powered by: WebSVN 2.1.0

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