This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/64504] Invalid free() with _GLIBCXX_DEBUG and -fwhole-program
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Jan 2015 11:18:39 +0000
- Subject: [Bug libstdc++/64504] Invalid free() with _GLIBCXX_DEBUG and -fwhole-program
- Auto-submitted: auto-generated
- References: <bug-64504-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64504
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Andrey Vihrov from comment #0)
> -fwhole-program is that it can be used with one source file that includes
> standard library headers and links with the standard library. If this is
> wrong, then I'm sorry for filing a bogus bug report.
I don't know if it's supposed to work (I would expect not), but using
-fwhole-program with _GLIBCXX_DEBUG seems silly to me. The Debug Mode macro can
slow things down by an order of magnitude, so the advantages of -fwhole-program
will be minimal anyway.
Is there a reason you can't use -flto instead?