re PR middle-end/34971 (bitfield rotates are folded and expanded wrong)
authorRichard Guenther <rguenther@suse.de>
Wed, 27 Feb 2008 09:50:04 +0000 (09:50 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 27 Feb 2008 09:50:04 +0000 (09:50 +0000)
commit70582b3afe47248d2b70c5731fb7cf44fa17dc16
treeef16ed7af638323b496055d922dbdc8e19ef42aa
parenta15f0fd02870fef9742d517d0894e02bdd0bbdb3
re PR middle-end/34971 (bitfield rotates are folded and expanded wrong)

2008-02-27  Richard Guenther  <rguenther@suse.de>

PR middle-end/34971
* expr.c (expand_expr_real_1): Assert on rotates that operate
on partial modes.
* fold-const.c (fold_binary): Use the types precision, not the
bitsize of the mode if folding rotate expressions.  Build rotates
only for full modes.

* gcc.c-torture/execute/pr34971.c: New testcase.

From-SVN: r132706
gcc/ChangeLog
gcc/expr.c
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr34971.c [new file with mode: 0644]