fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / extended_char_comparison_1.f
blobb3d7c0456209d7be1983e5adba7b636f29396581
1 ! { dg-do run }
2 ! { dg-options "-std=legacy" }
4 ! PR 27715 - the front end and the library used to have different ideas
5 ! about ordering for characters whose encoding is above 127.
7 program main
8 character*1 c1, c2
9 logical a1, a2
10 c1 = 'ç';
11 c2 = 'c';
12 a1 = c1 > c2;
13 call setval(c1, c2)
14 a2 = c1 > c2
15 if (a1 .neqv. a2) call abort
16 end
18 subroutine setval(c1, c2)
19 character*1 c1, c2
20 c1 = 'ç';
21 c2 = 'c';
22 end