aboutsummaryrefslogtreecommitdiff
path: root/gcc/profile-count.h
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-11-07 10:33:22 +0100
committerMartin Liska <marxin@gcc.gnu.org>2018-11-07 09:33:22 +0000
commit907050e34f4d1b5471e738cf5a718a8c6f50e334 (patch)
treedeb77b6e57768a9edb6812fdbddb78321929cfb2 /gcc/profile-count.h
parent9cfc08c0491270417557f00998857722c405f0b3 (diff)
downloadgcc-907050e34f4d1b5471e738cf5a718a8c6f50e334.zip
gcc-907050e34f4d1b5471e738cf5a718a8c6f50e334.tar.gz
gcc-907050e34f4d1b5471e738cf5a718a8c6f50e334.tar.bz2
Fix UBSAN in postreload-gcse.c (PR rtl-optimization/87868).
2018-11-07 Martin Liska <mliska@suse.cz> PR rtl-optimization/87868 * postreload-gcse.c (eliminate_partially_redundant_load): Set threshold to max_count if we would overflow. * profile-count.h: Make max_count a public constant. From-SVN: r265869
Diffstat (limited to 'gcc/profile-count.h')
-rw-r--r--gcc/profile-count.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/profile-count.h b/gcc/profile-count.h
index f4d0c34..5d3bcc7 100644
--- a/gcc/profile-count.h
+++ b/gcc/profile-count.h
@@ -641,8 +641,8 @@ public:
type to hold various extra stages. */
static const int n_bits = 61;
-private:
static const uint64_t max_count = ((uint64_t) 1 << n_bits) - 2;
+private:
static const uint64_t uninitialized_count = ((uint64_t) 1 << n_bits) - 1;
uint64_t m_val : n_bits;