summaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics
diff options
context:
space:
mode:
authordfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-08 21:46:16 +0000
committerdfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-08 21:46:16 +0000
commit805c177c767110dc88afe8950d0f06b187f9e2a0 (patch)
treeb27cd78d4f00e742212ffe4e854e65352ce4928e /libgfortran/intrinsics
parentf1a634766aaec4defc7ef45cda41ed8c498ca313 (diff)
downloadgcc-805c177c767110dc88afe8950d0f06b187f9e2a0.tar.gz
2007-03-08 Daniel Franke <franke.daniel@gmail.com>
PR fortran/30947 * intrinsics/signal.c (alarm_sub_int): Avoid SEGFAULT with integer arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122716 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/intrinsics')
-rw-r--r--libgfortran/intrinsics/signal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/intrinsics/signal.c b/libgfortran/intrinsics/signal.c
index e912c90780e..2c2f38d2969 100644
--- a/libgfortran/intrinsics/signal.c
+++ b/libgfortran/intrinsics/signal.c
@@ -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