aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlex Coplan <alex.coplan@arm.com>2021-04-23 14:09:15 +0100
committerAlex Coplan <alex.coplan@arm.com>2021-04-23 14:09:15 +0100
commit5d87c2251c441f056e0a44f928ffcb8a8a679b6b (patch)
treeaad4f0b1e2b97d8a155e5db24c37b157c2311a4f /gcc
parent0e1e7b77904f1fe2a6dbfe84bb4fc026584ba480 (diff)
downloadgcc-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.c2
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. */