Commit ba585b91 by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/92610 (ICE in calc_dfs_tree, at dominance.c:458 since r270940)

	PR rtl-optimization/92610
	* cse.c (rest_of_handle_cse2): Call cleanup_cfg (0) also if
	cse_cfg_altered is set, even when tem is 0.
	(rest_of_handle_cse_after_global_opts): Likewise.

	* g++.dg/opt/pr92610.C: New test.

From-SVN: r278640
parent 41149aca
2019-11-23 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/92610
* cse.c (rest_of_handle_cse2): Call cleanup_cfg (0) also if
cse_cfg_altered is set, even when tem is 0.
(rest_of_handle_cse_after_global_opts): Likewise.
2019-11-22 Jakub Jelinek <jakub@redhat.com> 2019-11-22 Jakub Jelinek <jakub@redhat.com>
PR c++/92458 PR c++/92458
...@@ -7701,7 +7701,7 @@ rest_of_handle_cse2 (void) ...@@ -7701,7 +7701,7 @@ rest_of_handle_cse2 (void)
cse_cfg_altered |= cleanup_cfg (CLEANUP_CFG_CHANGED); cse_cfg_altered |= cleanup_cfg (CLEANUP_CFG_CHANGED);
timevar_pop (TV_JUMP); timevar_pop (TV_JUMP);
} }
else if (tem == 1) else if (tem == 1 || cse_cfg_altered)
cse_cfg_altered |= cleanup_cfg (0); cse_cfg_altered |= cleanup_cfg (0);
cse_not_expected = 1; cse_not_expected = 1;
...@@ -7775,7 +7775,7 @@ rest_of_handle_cse_after_global_opts (void) ...@@ -7775,7 +7775,7 @@ rest_of_handle_cse_after_global_opts (void)
cse_cfg_altered |= cleanup_cfg (CLEANUP_CFG_CHANGED); cse_cfg_altered |= cleanup_cfg (CLEANUP_CFG_CHANGED);
timevar_pop (TV_JUMP); timevar_pop (TV_JUMP);
} }
else if (tem == 1) else if (tem == 1 || cse_cfg_altered)
cse_cfg_altered |= cleanup_cfg (0); cse_cfg_altered |= cleanup_cfg (0);
flag_cse_follow_jumps = save_cfj; flag_cse_follow_jumps = save_cfj;
......
2019-11-23 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/92610
* g++.dg/opt/pr92610.C: New test.
2019-11-23 Bernd Edlinger <bernd.edlinger@hotmail.de> 2019-11-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/92365 PR c++/92365
......
// PR rtl-optimization/92610
// { dg-do compile }
// { dg-options "-w -fdelete-dead-exceptions --param=sccvn-max-alias-queries-per-access=0 -fno-dse -fnon-call-exceptions -Os -funroll-loops -ftrapv" }
struct C { int x; ~C () {} };
int
main ()
{
C *buffer = new C[42];
buffer[-3].x = 42;
delete [] buffer;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment