diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-02-16 14:54:30 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-02-16 14:54:30 +0100 |
commit | 8940b3b2a75b188bc68c747082657d5d1e6c82b2 (patch) | |
tree | a0e729b4caa91a35b874138ae8a236e49b023751 /gcc/convert.c | |
parent | 838731b61e6f6b91ed60653823abfc380e012a09 (diff) | |
download | gcc-8940b3b2a75b188bc68c747082657d5d1e6c82b2.zip gcc-8940b3b2a75b188bc68c747082657d5d1e6c82b2.tar.gz gcc-8940b3b2a75b188bc68c747082657d5d1e6c82b2.tar.bz2 |
re PR middle-end/19857 (alignment check of SSE constant fails in simple test program)
PR middle-end/19857
* fold-const.c (fold): Don't optimize (T)(x & cst) to
(T)x & (T)cst if (T)cst overflows.
* convert.c (convert_to_integer) <case POINTER_TYPE>: Pass
TYPE_UNSIGNED (type) as type_for_size's UNSIGNEDP argument.
* gcc.dg/tree-ssa/20050215-1.c: New test.
* gcc.c-torture/execute/20050215-1.c: New test.
From-SVN: r95106
Diffstat (limited to 'gcc/convert.c')
-rw-r--r-- | gcc/convert.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/convert.c b/gcc/convert.c index 005d3e2..f1a38c2 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -387,7 +387,8 @@ convert_to_integer (tree type, tree expr) expr = integer_zero_node; else expr = fold (build1 (CONVERT_EXPR, - lang_hooks.types.type_for_size (POINTER_SIZE, 0), + lang_hooks.types.type_for_size + (POINTER_SIZE, TYPE_UNSIGNED (type)), expr)); return convert_to_integer (type, expr); |