User account creation filtered due to spam.

Bug 36114 - [4.4 Regression] "f951: internal compiler error: Bus error" due to revision 134867
Summary: [4.4 Regression] "f951: internal compiler error: Bus error" due to revision 1...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: 4.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-02 22:29 UTC by Dominique d'Humieres
Modified: 2008-05-04 00:29 UTC (History)
2 users (show)

See Also:
Host: *-apple-darwin9
Target: *-apple-darwin9
Build: *-apple-darwin9
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique d'Humieres 2008-05-02 22:29:52 UTC
The following codes from pr29921 and pr35770:

ibook-dhum] f90/bug% cat pr29921.f90
! { dg-do compile }
      SUBROUTINE foo
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      LOGICAL MASWRK
      COMMON /FRAME / W1,W2,W3
      COMMON /FRAMES/ X1,Y1,Z1,X2,Y2,Z2,X3,Y3,Z3
      PARAMETER (ZERO=0.0D+00, ONE=1.0D+00)
      IF (IGROUP .EQ. 1) GO TO 600
      IF (IGROUP .EQ. 2) GO TO 620
  600 NT = 1
  620 CONTINUE
      IF (RHO .GT. TOL) THEN
         Y3 = RFIND('Y3      ',IERR)
            IF(IERR.NE.0) CALL ABRT
         Z3 = RFIND('Z3      ',IERR)
            IF(IERR.NE.0) CALL ABRT
         IF (MASWRK) WRITE (IP,9048) X3,Y3,Z3
      ELSE
         X1 = ZERO
         Y1 = ZERO
         Z1 = ZERO
         Z3 = ZERO
         X2 = ONE
         Y3 = ONE
      END IF
      W2 = (Z2-Z1)*(X3-X1)-(Z3-Z1)*(X2-X1)
 9048 FORMAT(9F10.5)
      END
[ibook-dhum] f90/bug% cat pr35770.f90
! fails on Windows XP
! gcc version 4.4.0 20080312 (experimental) [trunk revision 133139]
!maybe also see 34784?


      implicit character (s)  ! removing this fixes the problem
      REAL RDA(10)
      RDA = 0

      RDA(J1) = S_REAL_SQRT_I(RDA(J1))

      CONTAINS

      ELEMENTAL FUNCTION S_REAL_SQRT_I(X) RESULT (R)
      REAL, INTENT(IN)  ::  X
      REAL              ::  R
        R = 0.0
      END FUNCTION S_REAL_SQRT_I     !internal procedure

      END

gives "f951: internal compiler error: Bus error" after revision 134867. The bus errors disappear if I revert the revision, while pr35770 gives:

      RDA(J1) = S_REAL_SQRT_I(RDA(J1))
               1
Error: Can't convert CHARACTER(1) to REAL(4) at (1)
Comment 1 Janus Weil 2008-05-03 20:11:17 UTC
Confirmed. The ICEs you get are really due to my rev. 134867, which actually also triggered some testsuite failures (use_only_1.f90 and g77/970915-0.f). I have no idea why I didn't notice it (sorry!).

This can easily be fixed by the following small patch:

Index: gcc/fortran/misc.c
===================================================================
--- gcc/fortran/misc.c	(revision 134867)
+++ gcc/fortran/misc.c	(working copy)
@@ -77,6 +77,7 @@ gfc_clear_ts (gfc_typespec *ts)
   ts->derived = NULL;
   ts->kind = 0;
   ts->cl = NULL;
+  ts->interface = NULL;
   /* flag that says if the type is C interoperable */
   ts->is_c_interop = 0;
   /* says what f90 type the C kind interops with */
Comment 2 Janus Weil 2008-05-03 20:44:41 UTC
Fixed with rev. 134918.
Comment 3 Jerry DeLisle 2008-05-04 00:29:11 UTC
Fixed by r 134918. Closing