diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-19 21:27:51 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-19 21:27:51 +0000 |
commit | 60141df0b99ea85a2132e79c3ee2193d3ad31adc (patch) | |
tree | 0dd1c959d5fa1a9b4256002c3671f2654e454c31 /gcc/java | |
parent | fafb2b1c87f0a52f04ffa8a8cc7a82fc20b308f6 (diff) | |
download | gcc-60141df0b99ea85a2132e79c3ee2193d3ad31adc.tar.gz |
PR other/59545
* genattrtab.c (struct attr_hash): Change hashcode type to unsigned.
(attr_hash_add_rtx, attr_hash_add_string): Change hashcode parameter
to unsigned.
(attr_rtx_1): Change hashcode variable to unsigned.
(attr_string): Likewise. Perform first multiplication in unsigned
type.
* ifcvt.c (noce_try_store_flag_constants): Avoid signed integer
overflows.
* double-int.c (neg_double): Likewise.
* stor-layout.c (set_min_and_max_values_for_integral_type): Likewise.
* combine.c (force_to_mode): Likewise.
* postreload.c (move2add_use_add2_insn, move2add_use_add3_insn,
reload_cse_move2add, move2add_note_store): Likewise.
* simplify-rtx.c (simplify_const_unary_operation,
simplify_const_binary_operation): Likewise.
* ipa-split.c (find_split_points): Initialize first.can_split
and first.non_ssa_vars.
* gengtype-state.c (read_state_files_list): Fix up check.
* genautomata.c (reserv_sets_hash_value): Use portable rotation
idiom.
java/
* class.c (hashUtf8String): Compute hash in unsigned type.
* javaop.h (WORD_TO_INT): Avoid signed integer overflow.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206134 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/class.c | 2 | ||||
-rw-r--r-- | gcc/java/javaop.h | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 3b8a95a6baf..5ab19210cb7 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2013-12-19 Jakub Jelinek <jakub@redhat.com> + + PR other/59545 + * class.c (hashUtf8String): Compute hash in unsigned type. + * javaop.h (WORD_TO_INT): Avoid signed integer overflow. + 2013-11-22 Andrew MacLeod <amacleod@redhat.com> * java-gimplify.c: Add required include files from gimple.h. diff --git a/gcc/java/class.c b/gcc/java/class.c index 532c9c1d94f..e5d2e6d8e8c 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -920,7 +920,7 @@ hashUtf8String (const char *str, int len) { const unsigned char* ptr = (const unsigned char*) str; const unsigned char *limit = ptr + len; - int32 hash = 0; + uint32 hash = 0; for (; ptr < limit;) { int ch = UTF8_GET (ptr, limit); diff --git a/gcc/java/javaop.h b/gcc/java/javaop.h index 574c10c7992..bffa857cc3e 100644 --- a/gcc/java/javaop.h +++ b/gcc/java/javaop.h @@ -154,7 +154,7 @@ WORD_TO_INT(jword w) { jint n = w & 0xffffffff; /* Mask lower 32 bits. */ n ^= (jint)1 << 31; - n -= (jint)1 << 31; /* Sign extend lower 32 bits to upper. */ + n -= (uint32)1 << 31; /* Sign extend lower 32 bits to upper. */ return n; } |