[Bug fortran/82934] New: Segfault on assumed character length in allocate
pault at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 10 09:40:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82934
Bug ID: 82934
Summary: Segfault on assumed character length in allocate
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: pault at gcc dot gnu.org
Target Milestone: ---
Reported by FortranFan on clf:
https://groups.google.com/forum/#!topic/comp.lang.fortran/Lg8tBwlkS6A
character(len=42), allocatable :: foo
call alloc( foo )
print *, "len(foo) = ", len(foo), "; expected = 42"
contains
subroutine alloc( bar )
character(len=*), allocatable :: bar
allocate( character(len=*) :: bar )
end subroutine
end
[pault@pc30 pr78990]$ gfortran -static-libgfortran f*.f90 -O2
fortranfan1.f90:15:0:
allocate( character(len=*) :: bar , barbar)
1
internal compiler error: in gfc_trans_allocate, at fortran/trans-stmt.c:5316
GNU Fortran (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)
Goes through all the way to trunk.
Paul
More information about the Gcc-bugs
mailing list