Commit bbc8d04f by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/88478 (valgrind error in cselib_record_sets)

	PR rtl-optimization/88478
	* cselib.c (cselib_record_sets): Move sets[i].src_elt tests
	after REG_P (dest) test.

	* g++.dg/opt/pr88478.C: New test.

From-SVN: r267159
parent 302db8ba
2018-12-15 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/88478
* cselib.c (cselib_record_sets): Move sets[i].src_elt tests
after REG_P (dest) test.
2018-12-14 Martin Sebor <msebor@redhat.com>
PR tree-optimization/88372
......@@ -2616,10 +2616,10 @@ cselib_record_sets (rtx_insn *insn)
preserves the upper bits that di:SI=zero_extend(flags:CCNO<=0). */
scalar_int_mode mode;
if (dest != orig
&& sets[i].src_elt
&& cselib_record_sets_hook
&& REG_P (dest)
&& HARD_REGISTER_P (dest)
&& sets[i].src_elt
&& is_a <scalar_int_mode> (GET_MODE (dest), &mode)
&& n_sets + n_strict_low_parts < MAX_SETS)
{
......
2018-12-15 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/88478
* g++.dg/opt/pr88478.C: New test.
2018-12-14 Martin Sebor <msebor@redhat.com>
PR tree-optimization/88372
......
// PR rtl-optimization/88478
// { dg-do compile }
// { dg-options "-O2" }
struct A {
bool b;
int s;
template <typename T, typename U>
A (T, U) {}
};
enum F {} f;
A
foo ()
{
return A (false, f);
}
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