https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79197
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Probably duplicate test-case for C++:
template <class T> class A
{
public:
operator bool ();
T *operator-> ();
template <class U> A<U> m_fn1 ();
T *d;
};
class B
{
public:
typedef A<B> Ptr;
};
template <typename T> T constant_value (long long *);
class C
{
public:
typedef A<C> Ptr;
long long value___trans_tmp_1_0;
template <class ValueType>
ValueType
m_fn2 ()
{
return constant_value<float> (&value___trans_tmp_1_0);
}
};
class D
{
B::Ptr m_lastType;
void m_fn3 ();
};
void
D::m_fn3 ()
{
B::Ptr conditionType, leftType;
if (C::Ptr condition = conditionType.m_fn1<C> ())
if (condition->m_fn2<unsigned long> ())
m_lastType = leftType;
}
./xgcc -B. tc.ii
tc.ii: In member function ‘ValueType C::m_fn2() [with ValueType = long unsigned
int]’:
tc.ii:25:3: error: unrecognizable insn:
}
^
(insn 11 10 14 2 (set (reg:DI 157 [ _7 ])
(unsigned_fix:DI (reg:DF 159))) "tc.ii":24 -1
(nil))
tc.ii:25:3: internal compiler error: in extract_insn, at recog.c:2311
0xcddaa8 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc/rtl-error.c:108
0xcddad9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/rtl-error.c:116
0xcaf401 extract_insn(rtx_insn*)
../../gcc/recog.c:2311
0xa7f5e3 instantiate_virtual_regs_in_insn
../../gcc/function.c:1589
0xa7f5e3 instantiate_virtual_regs
../../gcc/function.c:1957
0xa7f5e3 execute
../../gcc/function.c:2006