Bug 289121 - fortran95 initialisation of a component in a type definition generates a segmentation error
fortran95 initialisation of a component in a type definition generates a segm...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-13 07:39 EDT by Remi Butel
Modified: 2008-04-22 10:57 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-22 10:57:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Remi Butel 2007-09-13 07:39:09 EDT
Description of problem:

fortran95 initialisation of a component in a type definition generates a
segmentation error

Version-Release number of selected component (if applicable):
gfortran --version
GNU Fortran (GCC) 4.1.2 20070626 (Red Hat 4.1.2-13)

How reproducible:
gfortran -fdefault-real-8 -ffree-form -c bug.f90 -o GeomParam.o



Steps to Reproduce:
1. 
cat <<'EOD' >bug.f90
   MODULE GeomParam
      IMPLICIT NONE
      type double_st
         real :: x
         integer :: acc = -1
      end type double_st
   CONTAINS
      type (double_st) function max_dst_double(a,b)
         type (double_st), intent(in) :: a
         real, intent(in) :: b
         max_dst_double%x = Max(a%x, b)
      end function max_dst_double
      SUBROUTINE GEOMVol2DGeneric(h)
         TYPE(double_st), INTENT(IN OUT) ::  h
         h = max_dst_double(h,1.0)
      END SUBROUTINE GEOMVol2DGeneric
      SUBROUTINE GEOMMvvnoVertexCentered2d(jdeg)
         INTEGER, INTENT(IN) :: jdeg
         SELECT CASE (jdeg)
            CASE(3)
            CASE DEFAULT
         END SELECT
      CONTAINS
         SUBROUTINE verif()
            TYPE(double_st), DIMENSION(:,:), POINTER                 :: SNvol
            ALLOCATE( SNvol( 1:2, jdeg))
         END SUBROUTINE verif
      END SUBROUTINE GEOMMvvnoVertexCentered2d
   END MODULE GeomParam
EOD
2. gfortran -fdefault-real-8 -ffree-form -c bug.f90 -o GeomParam.o

  
Actual results:
bug.f95:11: erreur interne du compilateur: Erreur de segmentation
Veuillez soumettre un rapport complet d'anomalies,
avec le source pré-traité si nécessaire.
Consultez <URL:http://bugzilla.redhat.com/bugzilla> pour plus de détail.


Expected results:
correct compilation

Additional info:
Deleting = -1 in acc declaration enables compilation
Comment 1 Jakub Jelinek 2008-04-22 10:57:58 EDT
Works just fine with latest rawhide gcc (4.3.0-7).

Note You need to log in before you can comment on or make changes to this bug.