Commit 46ab5b6e by Kugan Vivekanandarajah Committed by Kugan Vivekanandarajah

re PR target/71281 (ICE on gcc trunk on knl, wsm, ivb and bdw targets (tree-ssa-reassoc))

gcc/ChangeLog:

2016-06-07  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/71281
	* tree-ssa-reassoc.c (reassociate_bb): Set uid for negate stmt.


gcc/testsuite/ChangeLog:

2016-06-07  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/71281
	* g++.dg/torture/pr71281.C: New test.

From-SVN: r237157
parent c7ca8ef8
2016-06-07 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/71281
* tree-ssa-reassoc.c (reassociate_bb): Set uid for negate stmt.
2016-06-07 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.h (enum ix86_enitity): Add X86_DIRFLAG.
......
2016-06-07 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/71281
* g++.dg/torture/pr71281.C: New test.
2016-06-06 Marek Polacek <polacek@redhat.com>
PR c/71362
......
// PR middle-end/71281
// { dg-do compile }
// { dg-additional-options "-std=c++11 -Ofast" }
template <typename> struct A;
template <typename _Tp> struct A<_Tp *> { typedef _Tp reference; };
template <typename _Iterator> class B {
public:
typename A<_Iterator>::reference operator*();
};
template <typename> class C;
template <typename> struct D;
template <typename _Tp> struct D<C<_Tp>> {
using value_type = _Tp;
using const_pointer = _Tp *;
template <typename _Up> using rebind_alloc = C<_Up>;
};
template <typename _Alloc> struct __alloc_traits : D<_Alloc> {
typedef D<_Alloc> _Base_type;
typedef typename _Base_type::value_type &reference;
template <typename _Tp> struct F {
typedef typename _Base_type::template rebind_alloc<_Tp> other;
};
};
template <typename _Tp, typename _Alloc> struct G {
typedef typename __alloc_traits<_Alloc>::template F<_Tp>::other
_Tp_alloc_type;
};
int a, b;
long d[1][1][1];
void fn1() __attribute__((__noreturn__));
template <typename _Tp, typename _Alloc = C<_Tp>> class H {
typedef __alloc_traits<typename G<_Tp, _Alloc>::_Tp_alloc_type> _Alloc_traits;
typedef typename _Alloc_traits::reference reference;
public:
B<typename _Alloc_traits::const_pointer> m_fn1();
long m_fn2();
reference operator[](unsigned);
reference m_fn3(unsigned){
if (m_fn2())
fn1();
}
};
H<H<H<unsigned>>> c;
void fn2() {
H<unsigned, C<int>> e;
for (int f = 1;;)
for (int g = 0;;)
for (int h = 0;;)
{
*d[0][h] =
c.m_fn3(f)[0][g] * a + -*(e).m_fn1() * b + (*c[f].m_fn1()).m_fn3(g);
}
}
......@@ -5387,6 +5387,7 @@ reassociate_bb (basic_block bb)
gimple_set_lhs (stmt, tmp);
gassign *neg_stmt = gimple_build_assign (lhs, NEGATE_EXPR,
tmp);
gimple_set_uid (neg_stmt, gimple_uid (stmt));
gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
gsi_insert_after (&gsi, neg_stmt, GSI_NEW_STMT);
update_stmt (stmt);
......
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