re PR fortran/30947 (intrinsic: ALARM)

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

        PR fortran/30947
        * intrinsics/signal.c (alarm_sub_int): Avoid SEGFAULT with
        integer arguments.

From-SVN: r122716
This commit is contained in:
Daniel Franke 2007-03-08 16:46:16 -05:00 committed by Daniel Franke
parent 32af37843c
commit 02330e1953
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2007-03-08 Daniel Franke <franke.daniel@gmail.com>
PR fortran/30947
* intrinsics/signal.c (alarm_sub_int): Avoid SEGFAULT with
integer arguments.
2007-03-04 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/30981

View File

@ -170,14 +170,14 @@ alarm_sub_int (int *seconds, int *handler, int *status)
#if defined (SIGALRM) && defined (HAVE_ALARM) && defined (HAVE_SIGNAL)
if (status != NULL)
{
if (signal (SIGALRM, (void (*)(int)) handler) == SIG_ERR)
if (signal (SIGALRM, (void (*)(int)) *handler) == SIG_ERR)
*status = -1;
else
*status = alarm (*seconds);
}
else
{
signal (SIGALRM, (void (*)(int)) handler);
signal (SIGALRM, (void (*)(int)) *handler);
alarm (*seconds);
}
#else