re PR bootstrap/63280 (Double free in GCC compiled with LTO and -O3.)
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 23 Sep 2014 14:47:45 +0000 (14:47 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 23 Sep 2014 14:47:45 +0000 (14:47 +0000)
gcc/
PR bootstrap/63280
* target-globals.c (target_globals::~target_globals): Fix location
of ira_int destruction.

From-SVN: r215515

gcc/ChangeLog
gcc/target-globals.c

index 576835f75b2550b8260348f87073af482d1034e5..991cc555a116494a424b7f2e242068f1ac8cbb1c 100644 (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.
index 52ac2c02dfcb47817fa113bd2e70115ee2363aaf..9122d672d0bc832314986ee83c89e82d95d3935c 100644 (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);