Commit c8c6a29e by Richard Biener Committed by Richard Biener

wide-int.h (wide_int_storage::operator=): Implement in terms of wi::copy.

2017-03-02  Richard Biener  <rguenther@suse.de>

	* wide-int.h (wide_int_storage::operator=): Implement in terms
	of wi::copy.

From-SVN: r245831
parent 83692f96
2017-03-02 Richard Biener <rguenther@suse.de>
* wide-int.h (wide_int_storage::operator=): Implement in terms
of wi::copy.
2017-03-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/79777
* tree-ssa-pre.c (eliminate_insert): Give up if we simplify
the to insert expression to sth existing.
......
......@@ -1019,6 +1019,9 @@ public:
HOST_WIDE_INT *write_val ();
void set_len (unsigned int, bool = false);
template <typename T>
wide_int_storage &operator = (const T &);
static wide_int from (const wide_int_ref &, unsigned int, signop);
static wide_int from_array (const HOST_WIDE_INT *, unsigned int,
unsigned int, bool = true);
......@@ -1058,6 +1061,18 @@ inline wide_int_storage::wide_int_storage (const T &x)
wi::copy (*this, xi);
}
template <typename T>
inline wide_int_storage&
wide_int_storage::operator = (const T &x)
{
{ STATIC_ASSERT (!wi::int_traits<T>::host_dependent_precision); }
{ STATIC_ASSERT (wi::int_traits<T>::precision_type != wi::CONST_PRECISION); }
WIDE_INT_REF_FOR (T) xi (x);
precision = xi.precision;
wi::copy (*this, xi);
return *this;
}
inline unsigned int
wide_int_storage::get_precision () const
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment