• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GCC with patches for Dreamcast


Commit MetaInfo

Revision1807c381d5dee44f24a07472d350a58f016cd5f5 (tree)
Time2021-05-05 18:16:07
AuthorAlex Coplan <alex.coplan@arm....>
CommiterAlex Coplan

Log Message

early-remat.c: Fix new/delete mismatch [PR100230]

This simple patch fixes a mistmatched operator new/delete in
early-remat.c which triggers ASan errors on (at least) AArch64 when
compiling SVE code.

gcc/ChangeLog:

PR rtl-optimization/100230
* early-remat.c (early_remat::sort_candidates): Use delete[]
instead of delete for array allocated with new[].

(cherry picked from commit 5d87c2251c441f056e0a44f928ffcb8a8a679b6b)

Change Summary

Incremental Difference

--- a/gcc/early-remat.c
+++ b/gcc/early-remat.c
@@ -1069,7 +1069,7 @@ early_remat::sort_candidates (void)
10691069
10701070 m_candidates.qsort (compare_candidates);
10711071
1072- delete postorder_index;
1072+ delete[] postorder_index;
10731073 }
10741074
10751075 /* Commit to the current candidate indices and initialize cross-references. */