From 2b12962772d3b0e85d860609f32bfb28515d5ba9 Mon Sep 17 00:00:00 2001 From: Joern Rennecke Date: Tue, 16 Nov 2010 21:46:28 +0000 Subject: re PR java/46386 (negative shift count in build_constants_constructor for 16 bit pointer targets) 2010-11-09 Joern Rennecke Andrew Haley PR java/46386 gcc/java: * constants.c (build_constants_constructor): Avoid negative shift. gcc: * config/pdp11/t-pdp11 (java/constants.o-warn): Remove. * config/t-pnt16-warn (java/constants.o-warn): Likewise. Co-Authored-By: Andrew Haley From-SVN: r166826 --- gcc/java/constants.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/java/constants.c') diff --git a/gcc/java/constants.c b/gcc/java/constants.c index 14410d1..c80afc7 100644 --- a/gcc/java/constants.c +++ b/gcc/java/constants.c @@ -540,8 +540,8 @@ build_constants_constructor (void) FIXME: This is a kludge. The field we're initializing is not a scalar but a union, and that's how we should represent it in the compiler. We should fix this. */ - if (BYTES_BIG_ENDIAN && POINTER_SIZE > 32) - temp <<= POINTER_SIZE - 32; + if (BYTES_BIG_ENDIAN) + temp <<= ((POINTER_SIZE > 32) ? POINTER_SIZE - 32 : 0); CONSTRUCTOR_PREPEND_VALUE (t, get_tag_node (outgoing_cpool->tags[i])); CONSTRUCTOR_PREPEND_VALUE (d, -- cgit v1.1