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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [adjustr.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! pr 15294 - [gfortran] ADJUSTR intrinsic accesses corrupted pointer
2
!
3
  program test_adjustr
4
  implicit none
5
  integer test_cases
6
  parameter (test_cases=13)
7
  integer i
8
  character(len=10) s1(test_cases), s2(test_cases)
9
  s1(1)='A'
10
  s2(1)='         A'
11
  s1(2)='AB'
12
  s2(2)='        AB'
13
  s1(3)='ABC'
14
  s2(3)='       ABC'
15
  s1(4)='ABCD'
16
  s2(4)='      ABCD'
17
  s1(5)='ABCDE'
18
  s2(5)='     ABCDE'
19
  s1(6)='ABCDEF'
20
  s2(6)='    ABCDEF'
21
  s1(7)='ABCDEFG'
22
  s2(7)='   ABCDEFG'
23
  s1(8)='ABCDEFGH'
24
  s2(8)='  ABCDEFGH'
25
  s1(9)='ABCDEFGHI'
26
  s2(9)=' ABCDEFGHI'
27
  s1(10)='ABCDEFGHIJ'
28
  s2(10)='ABCDEFGHIJ'
29
  s1(11)=''
30
  s2(11)=''
31
  s1(12)=' '
32
  s2(12)=' '
33
  s1(13)='          '
34
  s2(13)='          '
35
  do I = 1,test_cases
36
     print*,i
37
     print*, 's1          = "', s1(i), '"'
38
     print*, 's2          = "', s2(i), '"'
39
     print*, 'adjustr(s1) = "', adjustr(s1(i)), '"'
40
     if (adjustr(s1(i)).ne.s2(i)) then
41
         print*,'fail'
42
         call abort
43
     endif
44
  enddo
45
 
46
  end program test_adjustr

powered by: WebSVN 2.1.0

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