http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54134
Bug #: 54134
Summary: ICE overriding derived type bound function with
allocatable character as result
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 27903
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27903
Code that reproduces the ICE with the correct output from two other compilers.
Consider the derived type A with no-pass type bound function which has an
allocatable character string as result. Now extend this type A with a type B
which overrides that function. The combination of this overriding and the fact
that the result is allocatable results in an ICE. Removing the inheritance from
A and/or changing the result type to a fixed length character string does not
trigger the ICE as shown in the attached example.