summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/selected_char_kind_4.f90
blob: 046ddf0e74cfcf187201ddaf84b1a37ca7d9923e (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
! { dg-do run }
!
! Check that runtime result values of SELECTED_CHAR_KIND agree with
! front-end simplification results.
!
  implicit none
  character(len=20) :: s

  s = "ascii"
  if (selected_char_kind(s) /= selected_char_kind("ascii")) call abort

  s = "default"
  if (selected_char_kind(s) /= selected_char_kind("default")) call abort

  s = "iso_10646"
  if (selected_char_kind(s) /= selected_char_kind("iso_10646")) call abort

  s = ""
  if (selected_char_kind(s) /= selected_char_kind("")) call abort

  s = "invalid"
  if (selected_char_kind(s) /= selected_char_kind("invalid")) call abort

end