aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/iresolve.c
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-08-06 23:02:38 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-08-06 23:02:38 +0000
commit19c222f890b08f00f999b2853b09a0152ac423fb (patch)
tree22a8fdfdc53e25a6f6189de25babaa2d78f182d8 /gcc/fortran/iresolve.c
parent52f6c31a521d7304f8573ac78bf60e4bd521c4ce (diff)
downloadgcc-19c222f890b08f00f999b2853b09a0152ac423fb.zip
gcc-19c222f890b08f00f999b2853b09a0152ac423fb.tar.gz
gcc-19c222f890b08f00f999b2853b09a0152ac423fb.tar.bz2
re PR fortran/30947 (intrinsic: ALARM)
PR fortran/30947 * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name with the kind of the STATUS argument. * intrinsics/signal.c: Create specific versions of alarm_sub and alarm_sub_int according to the integer kind of the last argument. * gfortran.map (GFORTRAN_1.0): Remove _gfortran_alarm_sub and _gfortran_alarm_sub_int, add _gfortran_alarm_sub_i4, _gfortran_alarm_sub_i8, _gfortran_alarm_sub_int_i4 and _gfortran_alarm_sub_int_i8. From-SVN: r127259
Diffstat (limited to 'gcc/fortran/iresolve.c')
-rw-r--r--gcc/fortran/iresolve.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c
index 21ec605..d0a73bf 100644
--- a/gcc/fortran/iresolve.c
+++ b/gcc/fortran/iresolve.c
@@ -2385,15 +2385,19 @@ gfc_resolve_alarm_sub (gfc_code *c)
ts.type = BT_INTEGER;
ts.kind = gfc_c_int_kind;
- /* handler can be either BT_INTEGER or BT_PROCEDURE */
+ /* handler can be either BT_INTEGER or BT_PROCEDURE.
+ In all cases, the status argument is of default integer kind
+ (enforced in check.c) so that the function suffix is fixed. */
if (handler->ts.type == BT_INTEGER)
{
if (handler->ts.kind != gfc_c_int_kind)
gfc_convert_type (handler, &ts, 2);
- name = gfc_get_string (PREFIX ("alarm_sub_int"));
+ name = gfc_get_string (PREFIX ("alarm_sub_int_i%d"),
+ gfc_default_integer_kind);
}
else
- name = gfc_get_string (PREFIX ("alarm_sub"));
+ name = gfc_get_string (PREFIX ("alarm_sub_i%d"),
+ gfc_default_integer_kind);
if (seconds->ts.kind != gfc_c_int_kind)
gfc_convert_type (seconds, &ts, 2);