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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-fdump-tree-original" }
3
! PR12456 - Optimize string(k:k) as single character.
4
 
5
Program pr12456
6
character a
7
character b
8
character (len=5) :: c
9
integer i
10
 
11
b = 'a'
12
a = b
13
if (a .ne. 'a') call abort()
14
if (a .ne. b) call abort()
15
c (3:3) = 'a'
16
if (c (3:3) .ne. b) call abort ()
17
if (c (3:3) .ne. 'a') call abort ()
18
if (LGT (a, c (3:3))) call abort ()
19
if (LGT (a, 'a')) call abort ()
20
 
21
i = 3
22
c (i:i) = 'a'
23
if (c (i:i) .ne. b) call abort ()
24
if (c (i:i) .ne. 'a') call abort ()
25
if (LGT (a, c (i:i))) call abort ()
26
 
27
if (a .gt. char (255)) call abort ()
28
end
29
 
30
! There should not be _gfortran_compare_string and _gfortran_copy_string in
31
! the dumped file.
32
 
33
! { dg-final { scan-tree-dump-times "_gfortran_compare_string" 0 "original" } }
34
! { dg-final { scan-tree-dump-times "_gfortran_copy_string" 0 "original" } }
35
 
36
! { dg-final { cleanup-tree-dump "original" } }

powered by: WebSVN 2.1.0

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