]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR testsuite/48809 (switch statement optimization error)
authorJakub Jelinek <jakub@redhat.com>
Wed, 4 May 2011 09:19:07 +0000 (11:19 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 4 May 2011 09:19:07 +0000 (11:19 +0200)
commit0a11a513d2f12dd94fa52d05ffb025224859a0a9
treeb0fba36517519de409f419d9a8717682581b2bb9
parent43abdfb928ceb1c4dcf803bd1bb7978190e82193
backport: re PR testsuite/48809 (switch statement optimization error)

Backport from mainline
2011-04-30  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/48809
* tree-switch-conversion.c (build_arrays): Compute tidx in unsigned
type.
(gen_inbound_check): Don't compute index_expr - range_min in utype
again, instead reuse SSA_NAME initialized in build_arrays.
Remove two useless gsi_for_stmt calls.

* gcc.c-torture/execute/pr48809.c: New test.

From-SVN: r173358
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr48809.c [new file with mode: 0644]
gcc/tree-switch-conversion.c