Commit 332e7efe by Steven G. Kargl Committed by Steven G. Kargl

check.c (gfc_check_achar): New function

	* check.c (gfc_check_achar): New function
	* intrinsic.h: Prototype it.
	* intrinsic.c (add_function): Use it.

	* gfortran.dg/achar_1.f90: New test.

From-SVN: r95288
parent 6ca84a80
2005-02-19 Steven G. Kargl <kargls@comcast.net>
* check.c (gfc_check_achar): New function
* intrinsic.h: Prototype it.
* intrinsic.c (add_function): Use it.
2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
* trans-stmt.c (generate_loop_for_temp_to_lhs,
......
......@@ -401,6 +401,16 @@ gfc_check_abs (gfc_expr * a)
return SUCCESS;
}
try
gfc_check_achar (gfc_expr * a)
{
if (type_check (a, 0, BT_INTEGER) == FAILURE)
return FAILURE;
return SUCCESS;
}
try
gfc_check_all_any (gfc_expr * mask, gfc_expr * dim)
......
......@@ -894,7 +894,7 @@ add_functions (void)
make_generic ("abs", GFC_ISYM_ABS, GFC_STD_F77);
add_sym_1 ("achar", 1, 1, BT_CHARACTER, dc, GFC_STD_F95,
NULL, gfc_simplify_achar, NULL,
gfc_check_achar, gfc_simplify_achar, NULL,
i, BT_INTEGER, di, REQUIRED);
make_generic ("achar", GFC_ISYM_ACHAR, GFC_STD_F95);
......
......@@ -31,6 +31,7 @@ try gfc_check_a_xkind (gfc_expr *, gfc_expr *);
try gfc_check_a_p (gfc_expr *, gfc_expr *);
try gfc_check_abs (gfc_expr *);
try gfc_check_achar (gfc_expr *);
try gfc_check_all_any (gfc_expr *, gfc_expr *);
try gfc_check_allocated (gfc_expr *);
try gfc_check_associated (gfc_expr *, gfc_expr *);
......
2005-02-19 Steven G. Kargl <kargls@comcast.net>
* gfortran.dg/achar_1.f90: New test.
2005-02-19 Hans-Peter Nilsson <hp@axis.com>
* gcc.c-torture/execute/20020720-1.x: Don't XFAIL cris-*-*.
......
! { dg-do run }
! achar() should work with all supported integer kinds.
program bug6
integer(1) :: i = 65
character a
a = achar(i)
if (a /= 'A') call abort
end program bug6
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment