[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug fortran/49690] [4.6/4.7 regression] ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1019



http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49690

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-09 18:11:42 UTC ---
Draft patch.

As both integer arguments and function-pointer arguments are pointers, using a
generic "void *" (BT_VOID) is the simplest. A more cumbersome alternative would
be to split the generated decl in one for
 int signal_func (int *number, void (*handler)(int))
and one for
 int signal_func_int (int *number, int *handler)

--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -2594,7 +2594,7 @@ add_functions (void)

   add_sym_2 ("signal", GFC_ISYM_SIGNAL, CLASS_IMPURE, ACTUAL_NO, BT_INTEGER,
             di, GFC_STD_GNU, gfc_check_signal, NULL, gfc_resolve_signal,
-            num, BT_INTEGER, di, REQUIRED, han, BT_UNKNOWN, 0, REQUIRED);
+            num, BT_INTEGER, di, REQUIRED, han, BT_VOID, 0, REQUIRED);

   make_generic ("signal", GFC_ISYM_SIGNAL, GFC_STD_GNU);

-- 
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Reply to: