This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49161] [4.5 Regression] Fix VRP on switch stmts
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Jul 2011 12:52:12 +0000
- Subject: [Bug tree-optimization/49161] [4.5 Regression] Fix VRP on switch stmts
- Auto-submitted: auto-generated
- References: <bug-49161-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49161
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-19 12:51:31 UTC ---
Author: jakub
Date: Tue Jul 19 12:51:29 2011
New Revision: 176451
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176451
Log:
Backport from mainline
2011-05-26 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/49161
* tree-vrp.c (struct case_info): New type.
(compare_case_labels): Sort case_info structs instead of
trees, and not primarily by CASE_LABEL uids but by
label_for_block indexes.
(find_switch_asserts): Put case labels into struct case_info
array instead of TREE_VEC, adjust sorting, compare label_for_block
values instead of CASE_LABELs.
* gcc.c-torture/execute/pr49161.c: New test.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.c-torture/execute/pr49161.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
branches/gcc-4_5-branch/gcc/tree-vrp.c