diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-10-28 10:34:51 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-10-28 10:34:51 +0000 |
commit | 89a45e5a89054028828bafd03ec606131ccc256d (patch) | |
tree | 8348ceeaf745bd11ba0b12ed05934a14f7afdf0f /gcc/fold-const.c | |
parent | d37e81ec7b3bba5aff7dce108ab601e3bf0ae421 (diff) | |
download | gcc-89a45e5a89054028828bafd03ec606131ccc256d.tar.gz |
PR middle-end/37931
* fold-const.c (distribute_bit_expr): Convert common, left and
right arguments to type.
* gcc.c-torture/execute/pr37931.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141406 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 1eac946e31b..7a215d27cb4 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3806,6 +3806,9 @@ distribute_bit_expr (enum tree_code code, tree type, tree arg0, tree arg1) else return 0; + common = fold_convert (type, common); + left = fold_convert (type, left); + right = fold_convert (type, right); return fold_build2 (TREE_CODE (arg0), type, common, fold_build2 (code, type, left, right)); } |