[Bug fortran/51529] [OOP] gfortran.dg/class_to_type_1.f03 is miscompiled: Uninitialized variable used

pault at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 13 18:50:00 GMT 2011


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

--- Comment #1 from Paul Thomas <pault at gcc dot gnu.org> 2011-12-13 18:14:49 UTC ---
(In reply to comment #0)
> $ gfortran -g gfortran.dg/class_to_type_1.f03
> $ MALLOC_PERTURB_= ./a.out
> $ MALLOC_PERTURB_=33 ./a.out
> 
> A fatal error occurred! Backtrace for this error:
> ...
> #6  0x400929 in __copy_MAIN___T2 at class_to_type_1.f03:5
> #7  0x4013D1 in MAIN__ at class_to_type_1.f03:17
> 
> 
> That's a typical sign for code which requires that "malloc" returns '\0'-set
> memory, i.e. gfortran generates code which uses an uninitialized variable.

I cannot reproduce this on x86_64/FC9.  Nor can I see anything obvious in the
code.... on the other hand, there is a lot of it!

I'll try on my Debian equipped laptop tomorrow.

Paul



More information about the Gcc-bugs mailing list