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: [email protected]
ReportedBy: [email protected]
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".