re PR fortran/49690 (ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1019)
authorTobias Burnus <burnus@net-b.de>
Sun, 10 Jul 2011 14:28:48 +0000 (16:28 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Sun, 10 Jul 2011 14:28:48 +0000 (16:28 +0200)
2011-07-10  Tobias Burnus  <burnus@net-b.de>

        PR fortran/49690
        * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of
        * SIGNAL.

2011-07-10  Tobias Burnus  <burnus@net-b.de>

        PR fortran/49690
        * gfortran.dg/intrinsic_signal.f90: New.

From-SVN: r176121

gcc/fortran/ChangeLog
gcc/fortran/intrinsic.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/intrinsic_signal.f90 [new file with mode: 0644]

index 484315f9c99a770ae8f4d1815dbd2fdca1a52de6..2f0b50889f4f91804a3420ab75919f4302cd660a 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-10  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/49690
+       * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of SIGNAL.
+
 2011-07-09  Uros Bizjak  <ubizjak@gmail.com>
 
        PR fortran/48926
index a72da91defc962a47aa8cd87a021d92b0e90ac07..5946ddd8be27bcb8823abc64702cdfa3338964b6 100644 (file)
@@ -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);
 
index cfc09f049a2e05b768e654636a45382f9227b099..edeffaa12489158258bad6239bd3e9fc06c0ac0d 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-10  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/49690
+       * gfortran.dg/intrinsic_signal.f90: New.
+
 2011-07-09  Jason Merrill  <jason@redhat.com>
 
        * g++.dg/cpp0x/regress/regress6.C: New.
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_signal.f90 b/gcc/testsuite/gfortran.dg/intrinsic_signal.f90
new file mode 100644 (file)
index 0000000..cb57c95
--- /dev/null
@@ -0,0 +1,21 @@
+! { dg-do compile }
+!
+! PR fortran/49690
+!
+! Reduced test case, based on the one of Debian bug #631204
+!
+
+subroutine ctrlc_ast
+   common /xinterrupt/ interrupted
+   logical interrupted
+   interrupted = .true.
+end subroutine ctrlc_ast  
+
+subroutine set_ctrl_c(ctrlc_ast)
+   external ctrlc_ast
+   intrinsic signal
+   integer old_handle
+   common /xinterrupt/ interrupted
+   logical interrupted
+   old_handler = signal(2, ctrlc_ast)    
+end subroutine set_ctrl_c