re PR bootstrap/63280 (Double free in GCC compiled with LTO and -O3.)

gcc/
	PR bootstrap/63280
	* target-globals.c (target_globals::~target_globals): Fix location
	of ira_int destruction.

From-SVN: r215515
This commit is contained in:
Richard Sandiford 2014-09-23 14:47:45 +00:00 committed by Richard Sandiford
parent 48e968a720
commit ad01608e14
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2014-09-23 Richard Sandiford <richard.sandiford@arm.com>
PR bootstrap/63280
* target-globals.c (target_globals::~target_globals): Fix location
of ira_int destruction.
2014-09-23 Renlin Li <renlin.li@arm.com>
* config/aarch64/aarch64.md (return): New.

View File

@ -121,10 +121,10 @@ save_target_globals_default_opts ()
target_globals::~target_globals ()
{
ira_int->~target_ira_int ();
/* default_target_globals points to static data so shouldn't be freed. */
if (this != &default_target_globals)
{
ira_int->~target_ira_int ();
hard_regs->finalize ();
XDELETE (flag_state);
XDELETE (regs);