diff options
author | Alex Coplan <alex.coplan@arm.com> | 2021-04-23 14:09:15 +0100 |
---|---|---|
committer | Alex Coplan <alex.coplan@arm.com> | 2021-04-23 14:09:15 +0100 |
commit | 5d87c2251c441f056e0a44f928ffcb8a8a679b6b (patch) | |
tree | aad4f0b1e2b97d8a155e5db24c37b157c2311a4f /gcc | |
parent | 0e1e7b77904f1fe2a6dbfe84bb4fc026584ba480 (diff) | |
download | gcc-5d87c2251c441f056e0a44f928ffcb8a8a679b6b.zip gcc-5d87c2251c441f056e0a44f928ffcb8a8a679b6b.tar.gz gcc-5d87c2251c441f056e0a44f928ffcb8a8a679b6b.tar.bz2 |
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[].
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/early-remat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/early-remat.c b/gcc/early-remat.c index c8d4fee..92077d0 100644 --- a/gcc/early-remat.c +++ b/gcc/early-remat.c @@ -1059,7 +1059,7 @@ early_remat::sort_candidates (void) m_candidates.qsort (compare_candidates); - delete postorder_index; + delete[] postorder_index; } /* Commit to the current candidate indices and initialize cross-references. */ |