summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/widechar_1.f90
blob: 804de9d7a44edbef038624ac8d195d767131aed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
! { dg-do compile }
! { dg-options "-fbackslash" }

  character(len=20,kind=4) :: s4
  character(len=20,kind=1) :: s1

  s1 = "foo\u0000"
  s1 = "foo\u00ff"
  s1 = "foo\u0100" ! { dg-error "is not representable" }
  s1 = "foo\u0101" ! { dg-error "is not representable" }
  s1 = "foo\U00000101" ! { dg-error "is not representable" }

  s1 = 4_"foo bar"
  s1 = 4_"foo\u00ff"
  s1 = 4_"foo\u0101" ! { dg-error "cannot be converted" }
  s1 = 4_"foo\u1101" ! { dg-error "cannot be converted" }
  s1 = 4_"foo\UFFFFFFFF" ! { dg-error "cannot be converted" }

  s4 = "foo\u0000"
  s4 = "foo\u00ff"
  s4 = "foo\u0100" ! { dg-error "is not representable" }
  s4 = "foo\U00000100" ! { dg-error "is not representable" }

  s4 = 4_"foo bar"
  s4 = 4_"\xFF\x96"
  s4 = 4_"\x00\x96"
  s4 = 4_"foo\u00ff"
  s4 = 4_"foo\u0101"
  s4 = 4_"foo\u1101"
  s4 = 4_"foo\Uab98EF56"
  s4 = 4_"foo\UFFFFFFFF"

end