| 1 |
C { dg-do run { target fd_truncate } } |
| 2 |
C { dg-options "-fbackslash" } |
| 3 |
C PR fortran/30278 |
| 4 |
program a |
| 5 |
character(len=1), parameter :: c1 = char(8), c2 = char(92) |
| 6 |
character(len=35) str1, str2 |
| 7 |
character(len=37) :: str4, str3 |
| 8 |
|
| 9 |
open(10, status='scratch') |
| 10 |
write(10, 100) |
| 11 |
rewind(10) |
| 12 |
read(10,'(A34)') str1 |
| 13 |
str2 = 'Does ' // c1 // 'ackslash result in ' // c1 // 'ackslash' |
| 14 |
if (str1 .ne. str2) STOP 1 |
| 15 |
|
| 16 |
rewind(10) |
| 17 |
write (10, 200) |
| 18 |
rewind(10) |
| 19 |
read(10,'(A37)') str3 |
| 20 |
str4 = 'Does ' //c2// 'backslash result in ' //c2// 'backslash' |
| 21 |
if (str3 .ne. str4) STOP 2 |
| 22 |
|
| 23 |
stop |
| 24 |
100 format ('Does \backslash result in \backslash') |
| 25 |
200 format ('Does \\backslash result in \\backslash') |
| 26 |
end |