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
This commit is contained in:
parent
aeabd15d45
commit
32af37843c
4 changed files with 17 additions and 6 deletions
|
@ -1,3 +1,12 @@
|
|||
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.
|
||||
|
|
|
@ -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)
|
||||
return FAILURE;
|
||||
|
||||
if (kind_value_check (status, 2, gfc_default_integer_kind) == FAILURE)
|
||||
return FAILURE;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -785,7 +785,7 @@ end program test_aint
|
|||
@table @asis
|
||||
@item @emph{Description}:
|
||||
@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
|
||||
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
|
||||
|
@ -805,10 +805,11 @@ Subroutine
|
|||
@item @var{SECONDS} @tab The type of the argument shall be a scalar
|
||||
@code{INTEGER}. It is @code{INTENT(IN)}.
|
||||
@item @var{HANDLER} @tab Signal handler (@code{INTEGER FUNCTION} or
|
||||
@code{SUBROUTINE}) or dummy/global @code{INTEGER} scalar.
|
||||
@code{INTEGER}. It is @code{INTENT(IN)}.
|
||||
@code{SUBROUTINE}) or dummy/global @code{INTEGER} scalar. The scalar
|
||||
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
|
||||
@code{INTEGER} variable. It is @code{INTENT(OUT)}.
|
||||
variable of the default @code{INTEGER} kind. It is @code{INTENT(OUT)}.
|
||||
@end multitable
|
||||
|
||||
@item @emph{Example}:
|
||||
|
|
|
@ -2386,8 +2386,6 @@ gfc_resolve_alarm_sub (gfc_code *c)
|
|||
|
||||
if (seconds->ts.kind != gfc_c_int_kind)
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue