diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-03-22 14:03:20 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-03-22 14:03:20 +0000 |
commit | 80dc2066b9ad9fb163073fb7b66a399886b5b787 (patch) | |
tree | 676f740ed02f7c9e91151900c6be40fcc11bd38b /gcc/genautomata.c | |
parent | 792cd6a2ce33b991810ef44839ce617908bb2e43 (diff) | |
download | gcc-80dc2066b9ad9fb163073fb7b66a399886b5b787.tar.gz |
* toplev.c (init_local_tick): Avoid signed integer multiplication
overflow.
* genautomata.c (reserv_sets_hash_value): Fix rotate idiom, avoid
shift by first operand's bitsize.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208765 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genautomata.c')
-rw-r--r-- | gcc/genautomata.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/genautomata.c b/gcc/genautomata.c index 9db86155008..0c61278ff4c 100644 --- a/gcc/genautomata.c +++ b/gcc/genautomata.c @@ -3494,7 +3494,7 @@ reserv_sets_hash_value (reserv_sets_t reservs) { reservs_num--; hash_value += ((*reserv_ptr >> i) - | (*reserv_ptr << ((sizeof (set_el_t) * CHAR_BIT) & -i))); + | (*reserv_ptr << (((sizeof (set_el_t) * CHAR_BIT) - 1) & -i))); i++; if (i == sizeof (set_el_t) * CHAR_BIT) i = 0; |