This is the mail archive of the gcc-bugs@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]

Re: possible bug in egcs-1.1b g77; RH5.1 LINUX and cygwin32 platforms


>>>>> "Emil" == Emil Hallin <emil@skatter.usask.ca> writes:

 Emil> Sorry if this isn't the right format for a possible bug report, but I
 Emil> hope it is useful!

It's fine, thanks.

 Emil>      program egcs_bug
 Emil>      if (rand(0) .le. 0.5) kpio = 26
 Emil>      end

 Emil> The error message is:
 Emil> ../../egcs-1.1b/gcc/explow.c:650: Internal compiler error in function
 Emil> copy_to_mode_reg.

A compiler crash isn't a _possible_ bug!

This must be a longstanding problem that's presumably my fault.  I
think this is right -- Craig?

1998-10-01  Dave Love  <d.love@dl.ac.uk>

	* com.c (ffecom_expr_intrinsic_): Fix return type for RAND.

Index: com.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/f/com.c,v
retrieving revision 1.44
diff -p -c -r1.44 com.c
*** com.c	1998/08/05 11:16:54	1.44
--- com.c	1998/10/01 19:18:57
*************** ffecom_expr_intrinsic_ (ffebld expr, tre
*** 5103,5109 ****
  				  FALSE,
  				  ((codegen_imp == FFEINTRIN_impIRAND) ?
  				   ffecom_f2c_integer_type_node :
! 				   ffecom_f2c_doublereal_type_node),
  				  arg1_tree,
  				  dest_tree, dest, dest_used,
  				  NULL_TREE, TRUE);
--- 5103,5109 ----
  				  FALSE,
  				  ((codegen_imp == FFEINTRIN_impIRAND) ?
  				   ffecom_f2c_integer_type_node :
! 				   ffecom_f2c_real_type_node),
  				  arg1_tree,
  				  dest_tree, dest, dest_used,
  				  NULL_TREE, TRUE);

1998-10-01  Dave Love  <d.love@dl.ac.uk>

	* g77.f-torture/execute/u77-test.f (main): Regression test for
	crash compiling RAND.

Index: u77-test.f
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/testsuite/g77.f-torture/execute/u77-test.f,v
retrieving revision 1.3
diff -p -c -r1.3 u77-test.f
*** u77-test.f	1998/09/30 11:51:37	1.3
--- u77-test.f	1998/10/01 19:21:16
*************** c now try to get times to change enough 
*** 147,152 ****
--- 147,157 ----
        call dumdum(r1)
        call second(r1)
        write (6,*) 'CALL SECOND returns: ', r1
+ *     compiler crash fixed by 1998-10-01 com.c change
+       if (rand(0).lt.0.0 .or. rand(0).gt.1.0) then
+         write (6,*) '*** rand(0) error'
+         call abort()
+       end if
        i = getcwd(wd)
        if (i.ne.0) then
          call perror ('*** getcwd')


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