This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49161] [4.5/4.6/4.7 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: Thu, 26 May 2011 10:05:11 +0000
- Subject: [Bug tree-optimization/49161] [4.5/4.6/4.7 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 #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-26 10:05:08 UTC ---
Author: jakub
Date: Thu May 26 10:05:05 2011
New Revision: 174270
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174270
Log:
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:
trunk/gcc/testsuite/gcc.c-torture/execute/pr49161.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c