This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fortran patch for compiler crash


I've comitted this to both branches at Craig's request.

Tue Aug  4 16:59:39 1998  Craig Burley  <burley@gnu.org>

	* com.c (ffecom_convert_narrow_, ffecom_convert_widen_):
	Allow conversion from pointer to same-sized integer,
	to fix invoking SIGNAL as a function.

  
*** g77-e/gcc/f/com.c.~1~	Thu Jul 16 18:53:40 1998
--- g77-e/gcc/f/com.c	Tue Aug  4 16:57:29 1998
*************** ffecom_convert_narrow_ (type, expr)
*** 923,928 ****
    if (code == INTEGER_TYPE)
      {
!       assert (TREE_CODE (TREE_TYPE (e)) == INTEGER_TYPE);
!       assert (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (e)));
        return fold (convert_to_integer (type, e));
      }
--- 923,931 ----
    if (code == INTEGER_TYPE)
      {
!       assert ((TREE_CODE (TREE_TYPE (e)) == INTEGER_TYPE
! 	       && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (e)))
! 	      || (TREE_CODE (TREE_TYPE (e)) == POINTER_TYPE
! 		  && (TYPE_PRECISION (type)
! 		      == TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (e))))));
        return fold (convert_to_integer (type, e));
      }
*************** ffecom_convert_widen_ (type, expr)
*** 993,998 ****
    if (code == INTEGER_TYPE)
      {
!       assert (TREE_CODE (TREE_TYPE (e)) == INTEGER_TYPE);
!       assert (TYPE_PRECISION (type) >= TYPE_PRECISION (TREE_TYPE (e)));
        return fold (convert_to_integer (type, e));
      }
--- 996,1004 ----
    if (code == INTEGER_TYPE)
      {
!       assert ((TREE_CODE (TREE_TYPE (e)) == INTEGER_TYPE
! 	       && TYPE_PRECISION (type) >= TYPE_PRECISION (TREE_TYPE (e)))
! 	      || (TREE_CODE (TREE_TYPE (e)) == POINTER_TYPE
! 		  && (TYPE_PRECISION (type)
! 		      == TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (e))))));
        return fold (convert_to_integer (type, e));
      }
*** g77-e/gcc/f/version.c.~1~	Sat Jul 25 17:22:57 1998
--- g77-e/gcc/f/version.c	Tue Aug  4 17:02:25 1998
***************
*** 1 ****
! char *ffe_version_string = "0.5.24-19980725";
--- 1 ----
! char *ffe_version_string = "0.5.24-19980804";



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]