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/60881] New: ICE on dummy argument that extends a type with scalar and scalar coarry components


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

            Bug ID: 60881
           Summary: ICE on dummy argument that extends a type with scalar
                    and scalar coarry components
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rouson at stanford dot edu

The code and error message below demonstrate an ICE that occurs when passing an
actual argument that extends a type with two components: a default-initialized
scalar and an allocatable scalar coarray.

Damian


$ cat all.f90 
program main
  implicit none
  type co_object
    logical :: defined=.false.
    real, allocatable :: dummy_to_facilitate_extension[:]
  end type
  type, extends(co_object) :: global_field
  end type
  type(global_field) T
  call assign_local_field(T)
contains
  subroutine assign_local_field(lhs)
    type(global_field) lhs
  end subroutine
end program

$ gfortran -fcoarray=single all.f90 
all.f90: In function 'MAIN__':
all.f90:9:0: internal compiler error: in fold_convert_loc, at fold-const.c:2116
   type(global_field) T
 ^

all.f90:9:0: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
Abort trap: 6

$ gfortran --version
GNU Fortran (MacPorts gcc49 4.9-20140406_0) 4.9.0 20140406 (experimental)
Copyright (C) 2014 Free Software Foundation, Inc.


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