OSDN Git Service

2011-09-26 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / selected_char_kind_4.f90
1 ! { dg-do run }
2 !
3 ! Check that runtime result values of SELECTED_CHAR_KIND agree with
4 ! front-end simplification results.
5 !
6   implicit none
7   character(len=20) :: s
8
9   s = "ascii"
10   if (selected_char_kind(s) /= selected_char_kind("ascii")) call abort
11
12   s = "default"
13   if (selected_char_kind(s) /= selected_char_kind("default")) call abort
14
15   s = "iso_10646"
16   if (selected_char_kind(s) /= selected_char_kind("iso_10646")) call abort
17
18   s = ""
19   if (selected_char_kind(s) /= selected_char_kind("")) call abort
20
21   s = "invalid"
22   if (selected_char_kind(s) /= selected_char_kind("invalid")) call abort
23
24 end