diff options
author | Richard Biener <rguenther@suse.de> | 2019-03-12 07:56:23 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-03-12 07:56:23 +0000 |
commit | d9e1f37fad2db0cd749cd5c6f9e94972c8472610 (patch) | |
tree | f11132839af1ed186bfca4d0798668ec65801c08 /gcc/tree-ssa-math-opts.c | |
parent | 05073a0d54f65876f4aa827a3ae6b00b6dc74638 (diff) | |
download | gcc-d9e1f37fad2db0cd749cd5c6f9e94972c8472610.zip gcc-d9e1f37fad2db0cd749cd5c6f9e94972c8472610.tar.gz gcc-d9e1f37fad2db0cd749cd5c6f9e94972c8472610.tar.bz2 |
re PR tree-optimization/89664 (ICE in free_bb, at tree-ssa-math-opts.c:522)
2019-03-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/89664
* tree-ssa-math-opts.c (execute_cse_reciprocals_1): Properly
free the occurance tree after the early out.
* gfortran.dg/pr89664.f90: New testcase.
From-SVN: r269604
Diffstat (limited to 'gcc/tree-ssa-math-opts.c')
-rw-r--r-- | gcc/tree-ssa-math-opts.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index 5f1b369..cb8a914 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -799,7 +799,7 @@ execute_cse_reciprocals_1 (gimple_stmt_iterator *def_gsi, tree def) /* If it is more profitable to optimize 1 / x, don't optimize 1 / (x * x). */ if (sqrt_recip_count > square_recip_count) - return; + goto out; /* Do the expensive part only if we can hope to optimize something. */ if (count + square_recip_count >= threshold && count >= 1) @@ -842,6 +842,7 @@ execute_cse_reciprocals_1 (gimple_stmt_iterator *def_gsi, tree def) } } +out: for (occ = occ_head; occ; ) occ = free_bb (occ); |