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/46581] New: [4.6 Regression] [OOP] segfault in SELECT TYPE with associate-name


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

           Summary: [4.6 Regression] [OOP] segfault in SELECT TYPE with
                    associate-name
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: janus@gcc.gnu.org


Reported by Salvatore at http://gcc.gnu.org/ml/fortran/2010-11/msg00290.html.

Reduced test case:


program bug23
  implicit none

  type :: t1
    integer, allocatable :: ja(:)
  end type

  class(t1), allocatable  :: a 

  allocate(a)

  select type (aa=>a)
  type is (t1)
    write(*,*) 'Allocation status: ',allocated(aa%ja)
  end select

end program bug23


This compiles, but fails at runtime with a segfault.

It was working at r166401 (and r166825?), but fails at r166914. Possibly a
regression of r166480.

Note: With 4.5 it fails at runtime with a 'double free' error, after correctly
printing "Allocation status:  F".


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