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]
Other format: [Raw text]

[Bug fortran/42359] New: ICEs with specification function and init expression


$> cat ice-on-onvalid.f90
  INTERFACE
    PURE INTEGER FUNCTION spec_func()
    END FUNCTION
  END INTERFACE
  INTEGER :: p(spec_func()) = 23      ! scalar initializer, works without
  IF (SIZE(p) /= 42) CALL abort()
  IF (ANY(p /= 23)) CALL abort()
END

PURE INTEGER FUNCTION spec_func()
  spec_func = 42
END FUNCTION

$> gfortran-svn ice-on-valid.f90
ice-on-valid.f90: In function 'MAIN__':
ice-on-valid.f90:3:0: internal compiler error: tree check: expected array_type,
have pointer_type in gfc_conv_array_initializer, at fortran/trans-array.c:4087
Please submit a full bug report

If the initializer is an array, there's another ice ...
$> cat ice-on-valid.f90
  ! ice-on-valid in trans-array.c:4087

  INTERFACE
    PURE INTEGER FUNCTION spec_func()
    END FUNCTION
  END INTERFACE
  INTEGER :: p(spec_func()) = (/ 23 /)      ! array instead of scalar
  IF (SIZE(p) /= 42) CALL abort()
  IF (ANY(p /= 23)) CALL abort()
END

PURE INTEGER FUNCTION spec_func()
  spec_func = 42
END FUNCTION

$> gfortran-svn ice-on-valid.f90
ice-on-valid.f90: In function 'MAIN__':
ice-on-valid.f90:7:0: internal compiler error: in
gfc_trans_auto_array_allocation, at fortran/trans-array.c:4328
Please submit a full bug report

$> gfortran-svn -v
gcc version 4.5.0 20091212 (experimental) (GCC)


-- 
           Summary: ICEs with specification function and init expression
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dfranke at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42359


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