http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45828
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org,
| |janus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-29
13:01:54 UTC ---
With 4.3.2 I see after the malloc a loop which intializes the just allocated
array with the default initializer. Using 4.6.0 the array is allocated (malloc)
but no initialization loop is produced.
Extended test case:
type(a), target :: initVal
type b
type(a), pointer :: a => null()
type(a), pointer :: b => initVal
integer, pointer :: c => null()
end type b
If "c" is pointer default initialized, every thing works. But if a derived-type
component is pointer initialized (with NULL or with a target), no such
temporary is generated.
I wonder whether some check for BT_CLASS gets wrongly applied to BT_TYPE.