selected_char_kind.c (selected_char_kind): Fix return value for ISO_10646.
* intrinsics/selected_char_kind.c (selected_char_kind): Fix return value for ISO_10646. * gfortran.dg/selected_char_kind_4.f90: New test. From-SVN: r160527
This commit is contained in:
parent
acaed831f6
commit
cefab2e482
|
@ -1,3 +1,7 @@
|
||||||
|
2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||||
|
|
||||||
|
* gfortran.dg/selected_char_kind_4.f90: New test.
|
||||||
|
|
||||||
2010-06-09 Eric Botcazou <ebotcazou@adacore.com>
|
2010-06-09 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* gcc.dg/pr42461.c: New test.
|
* gcc.dg/pr42461.c: New test.
|
||||||
|
|
|
@ -0,0 +1,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
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||||
|
|
||||||
|
* intrinsics/selected_char_kind.c (selected_char_kind): Fix
|
||||||
|
return value for ISO_10646.
|
||||||
|
|
||||||
2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||||
|
|
||||||
* mk-kinds-h.sh: Define GFC_REAL_*_LITERAL_SUFFIX and
|
* mk-kinds-h.sh: Define GFC_REAL_*_LITERAL_SUFFIX and
|
||||||
|
|
|
@ -40,7 +40,7 @@ selected_char_kind (gfc_charlen_type name_len, char *name)
|
||||||
|| (len == 7 && strncasecmp (name, "default", 7) == 0))
|
|| (len == 7 && strncasecmp (name, "default", 7) == 0))
|
||||||
return 1;
|
return 1;
|
||||||
else if (len == 9 && strncasecmp (name, "iso_10646", 9) == 0)
|
else if (len == 9 && strncasecmp (name, "iso_10646", 9) == 0)
|
||||||
return 1;
|
return 4;
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue