Following is causing an ICE: $ gcc gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c -fnon-call-exceptions -fsanitize=thread -fexceptions during GIMPLE pass: cplxlower0 gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c: In function ‘sum’: gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c:9:3: internal compiler error: in calc_dfs_tree, at dominance.c:458 9 | A sum(A a,A b) | ^~~ 0x614cd5 calc_dfs_tree /home/marxin/Programming/gcc/gcc/dominance.c:458 0x954175 calculate_dominance_info(cdi_direction) /home/marxin/Programming/gcc/gcc/dominance.c:734 0xd96ea3 update_ssa(unsigned int) /home/marxin/Programming/gcc/gcc/tree-into-ssa.c:3356 0xc2a0f7 execute_function_todo /home/marxin/Programming/gcc/gcc/passes.c:1910 0xc2af6e execute_todo /home/marxin/Programming/gcc/gcc/passes.c:1996
complex lowering fails to cleanup the CFG in case it removed EH edges or alternatively at -O0 it lacks dominator info so gimple_purge_dead_eh_edges doesn't remove unreachable blocks.
Fixed.
Author: rguenth Date: Thu Nov 15 10:42:15 2018 New Revision: 266175 URL: https://gcc.gnu.org/viewcvs?rev=266175&root=gcc&view=rev Log: 2018-11-15 Richard Biener <rguenther@suse.de> PR tree-optimization/88030 * tree-complex.c (need_eh_cleanup): New global. (update_complex_assignment): Mark blocks that need EH update. (expand_complex_comparison): Likewise. (tree_lower_complex): Allocate and deallocate need_eh_cleanup, perform EH cleanup and schedule CFG cleanup if that did anything. * gcc.dg/tsan/pr88030.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/tsan/pr88030.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-complex.c
Author: rguenth Date: Thu Feb 7 08:16:07 2019 New Revision: 268608 URL: https://gcc.gnu.org/viewcvs?rev=268608&root=gcc&view=rev Log: 2019-02-07 Richard Biener <rguenther@suse.de> Backport from mainline 2018-12-11 Richard Biener <rguenther@suse.de> PR middle-end/88448 PR middle-end/88415 * tree-complex.c (update_complex_assignment): Properly transfer or clean EH info around gimple_assign_set_rhs_with_ops. * gcc.dg/gomp/pr88415.c: New testcase. 2018-11-15 Richard Biener <rguenther@suse.de> PR tree-optimization/88030 * tree-complex.c (need_eh_cleanup): New global. (update_complex_assignment): Mark blocks that need EH update. (expand_complex_comparison): Likewise. (tree_lower_complex): Allocate and deallocate need_eh_cleanup, perform EH cleanup and schedule CFG cleanup if that did anything. * gcc.dg/tsan/pr88030.c: New testcase. 2018-11-08 Richard Biener <rguenther@suse.de> PR tree-optimization/87929 * tree-complex.c (expand_complex_comparison): Clean EH. * gcc.dg/pr87929.c: New testcase. Added: branches/gcc-8-branch/gcc/testsuite/gcc.dg/gomp/pr88415.c branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr87929.c branches/gcc-8-branch/gcc/testsuite/gcc.dg/tsan/pr88030.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/testsuite/ChangeLog branches/gcc-8-branch/gcc/tree-complex.c
Author: rguenth Date: Wed Sep 4 08:06:24 2019 New Revision: 275366 URL: https://gcc.gnu.org/viewcvs?rev=275366&root=gcc&view=rev Log: 2019-09-04 Richard Biener <rguenther@suse.de> Backport from mainline 2019-04-09 Richard Sandiford <richard.sandiford@arm.com> * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Always use gimple_expr_type for load and store calls. Skip over the condition argument in a conditional internal function. Protect use of TREE_INT_CST_LOW. 2019-04-08 Richard Biener <rguenther@suse.de> PR tree-optimization/90006 * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Handle calls like lrint. * gcc.dg/vect/bb-slp-pr90006.c: New testcase. 2019-03-14 Richard Biener <rguenther@suse.de> PR middle-end/89698 * fold-const.c (operand_equal_p): For INDIRECT_REF check that the access types are similar. * g++.dg/torture/pr89698.C: New testcase. 2019-01-18 Richard Biener <rguenther@suse.de> PR tree-optimization/88903 * tree-vect-stmts.c (vectorizable_shift): Verify we see all scalar stmts a SLP shift amount is composed of when detecting shifts by scalars. * gcc.dg/vect/pr88903-1.c: New testcase. * gcc.dg/vect/pr88903-2.c: Likewise. 2018-12-11 Richard Biener <rguenther@suse.de> PR middle-end/88448 PR middle-end/88415 * tree-complex.c (update_complex_assignment): Properly transfer or clean EH info around gimple_assign_set_rhs_with_ops. * gcc.dg/gomp/pr88415.c: New testcase. 2018-11-15 Richard Biener <rguenther@suse.de> PR tree-optimization/88030 * tree-complex.c (need_eh_cleanup): New global. (update_complex_assignment): Mark blocks that need EH update. (expand_complex_comparison): Likewise. (tree_lower_complex): Allocate and deallocate need_eh_cleanup, perform EH cleanup and schedule CFG cleanup if that did anything. * gcc.dg/tsan/pr88030.c: New testcase. 2018-11-08 Richard Biener <rguenther@suse.de> PR tree-optimization/87929 * tree-complex.c (expand_complex_comparison): Clean EH. * gcc.dg/pr87929.c: New testcase. 2017-07-25 Eric Botcazou <ebotcazou@adacore.com> * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace to update EH info here. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/torture/pr89698.C branches/gcc-7-branch/gcc/testsuite/gcc.dg/gomp/pr88415.c branches/gcc-7-branch/gcc/testsuite/gcc.dg/pr87929.c branches/gcc-7-branch/gcc/testsuite/gcc.dg/tsan/pr88030.c branches/gcc-7-branch/gcc/testsuite/gcc.dg/vect/bb-slp-pr90006.c branches/gcc-7-branch/gcc/testsuite/gcc.dg/vect/pr88903-1.c branches/gcc-7-branch/gcc/testsuite/gcc.dg/vect/pr88903-2.c Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/fold-const.c branches/gcc-7-branch/gcc/gimple.c branches/gcc-7-branch/gcc/internal-fn.c branches/gcc-7-branch/gcc/internal-fn.h branches/gcc-7-branch/gcc/testsuite/ChangeLog branches/gcc-7-branch/gcc/testsuite/gcc.dg/autopar/pr91162.c branches/gcc-7-branch/gcc/tree-complex.c branches/gcc-7-branch/gcc/tree-vect-data-refs.c branches/gcc-7-branch/gcc/tree-vect-stmts.c