Commit 32af3784 by Daniel Franke Committed by Daniel Franke

re PR fortran/30947 (intrinsic: ALARM)

2007-03-08  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/30947
	* check.c (gfc_check_alarm_sub): Added check for default integer 
	kind of status argument.
	* iresolve.c (gfc_resolve_alarm_sub): Removed conversion of 
	status argument.
	* intrinsic.texi (ALARM): Extended documentation.

From-SVN: r122715
parent aeabd15d
2007-03-08 Daniel Franke <franke.daniel@gmail.com> 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
PR fortran/30947
* check.c (gfc_check_alarm_sub): Added check for default integer
kind of status argument.
* iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
status argument.
* intrinsic.texi (ALARM): Extended documentation.
2007-03-08 Daniel Franke <franke.daniel@gmail.com>
* intrinsic.texi (GERROR, ISATTY, TTYNAM): New. * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
(ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo. (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
* intrinsic.c (add_subroutines): Adjusted dummy argument names * intrinsic.c (add_subroutines): Adjusted dummy argument names
......
...@@ -2999,6 +2999,9 @@ gfc_check_alarm_sub (gfc_expr *seconds, gfc_expr *handler, gfc_expr *status) ...@@ -2999,6 +2999,9 @@ gfc_check_alarm_sub (gfc_expr *seconds, gfc_expr *handler, gfc_expr *status)
if (type_check (status, 2, BT_INTEGER) == FAILURE) if (type_check (status, 2, BT_INTEGER) == FAILURE)
return FAILURE; return FAILURE;
if (kind_value_check (status, 2, gfc_default_integer_kind) == FAILURE)
return FAILURE;
return SUCCESS; return SUCCESS;
} }
......
...@@ -785,7 +785,7 @@ end program test_aint ...@@ -785,7 +785,7 @@ end program test_aint
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
@code{ALARM(SECONDS, HANDLER [, STATUS])} causes external subroutine @var{HANDLER} @code{ALARM(SECONDS, HANDLER [, STATUS])} causes external subroutine @var{HANDLER}
to be executed after a delay of @var{SECONDS} by using @code{alarm(1)} to to be executed after a delay of @var{SECONDS} by using @code{alarm(2)} to
set up a signal and @code{signal(2)} to catch it. If @var{STATUS} is set up a signal and @code{signal(2)} to catch it. If @var{STATUS} is
supplied, it will be returned with the number of seconds remaining until supplied, it will be returned with the number of seconds remaining until
any previously scheduled alarm was due to be delivered, or zero if there any previously scheduled alarm was due to be delivered, or zero if there
...@@ -805,10 +805,11 @@ Subroutine ...@@ -805,10 +805,11 @@ Subroutine
@item @var{SECONDS} @tab The type of the argument shall be a scalar @item @var{SECONDS} @tab The type of the argument shall be a scalar
@code{INTEGER}. It is @code{INTENT(IN)}. @code{INTEGER}. It is @code{INTENT(IN)}.
@item @var{HANDLER} @tab Signal handler (@code{INTEGER FUNCTION} or @item @var{HANDLER} @tab Signal handler (@code{INTEGER FUNCTION} or
@code{SUBROUTINE}) or dummy/global @code{INTEGER} scalar. @code{SUBROUTINE}) or dummy/global @code{INTEGER} scalar. The scalar
@code{INTEGER}. It is @code{INTENT(IN)}. values may be either @code{SIG_IGN=1} to ignore the alarm generated
or @code{SIG_DFL=0} to set the default action. It is @code{INTENT(IN)}.
@item @var{STATUS} @tab (Optional) @var{STATUS} shall be a scalar @item @var{STATUS} @tab (Optional) @var{STATUS} shall be a scalar
@code{INTEGER} variable. It is @code{INTENT(OUT)}. variable of the default @code{INTEGER} kind. It is @code{INTENT(OUT)}.
@end multitable @end multitable
@item @emph{Example}: @item @emph{Example}:
......
...@@ -2386,8 +2386,6 @@ gfc_resolve_alarm_sub (gfc_code *c) ...@@ -2386,8 +2386,6 @@ gfc_resolve_alarm_sub (gfc_code *c)
if (seconds->ts.kind != gfc_c_int_kind) if (seconds->ts.kind != gfc_c_int_kind)
gfc_convert_type (seconds, &ts, 2); gfc_convert_type (seconds, &ts, 2);
if (status != NULL && status->ts.kind != gfc_c_int_kind)
gfc_convert_type (status, &ts, 2);
c->resolved_sym = gfc_get_intrinsic_sub_symbol (name); c->resolved_sym = gfc_get_intrinsic_sub_symbol (name);
} }
......
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