aboutsummaryrefslogtreecommitdiff
path: root/gcc/sreal.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-09-23 11:43:09 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-09-23 11:43:09 +0200
commit199d1d488f5de5c940f9010a9fdfd1e4d1f24fe1 (patch)
treebd250b365b5dc30fe887a842bf71518aa456145f /gcc/sreal.h
parent4ffc8099a7587030c1331e53dd9feba27f21b633 (diff)
downloadgcc-199d1d488f5de5c940f9010a9fdfd1e4d1f24fe1.zip
gcc-199d1d488f5de5c940f9010a9fdfd1e4d1f24fe1.tar.gz
gcc-199d1d488f5de5c940f9010a9fdfd1e4d1f24fe1.tar.bz2
ipa-cp.c (ipcp_store_vr_results): Avoid static local var zero.
* ipa-cp.c (ipcp_store_vr_results): Avoid static local var zero. * sreal.h (sreal::min, sreal::max): Avoid static local vars, construct values without normalization. * tree-ssa-sccvn.c (vn_reference_lookup_3): Don't initialize static local lhs_ops to vNULL. cp/ * name-lookup.c (store_bindings, store_class_bindings): Don't initialize static local bindings_need_stored to vNULL. From-SVN: r240408
Diffstat (limited to 'gcc/sreal.h')
-rw-r--r--gcc/sreal.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/sreal.h b/gcc/sreal.h
index edf02f1..ce9cdbb 100644
--- a/gcc/sreal.h
+++ b/gcc/sreal.h
@@ -104,14 +104,20 @@ public:
/* Global minimum sreal can hold. */
inline static sreal min ()
{
- static sreal min = sreal (-SREAL_MAX_SIG, SREAL_MAX_EXP);
+ sreal min;
+ /* This never needs normalization. */
+ min.m_sig = -SREAL_MAX_SIG;
+ min.m_exp = SREAL_MAX_EXP;
return min;
}
/* Global minimum sreal can hold. */
inline static sreal max ()
{
- static sreal max = sreal (SREAL_MAX_SIG, SREAL_MAX_EXP);
+ sreal max;
+ /* This never needs normalization. */
+ max.m_sig = SREAL_MAX_SIG;
+ max.m_exp = SREAL_MAX_EXP;
return max;
}