This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/69421] [6 Regression] ICE in maybe_legitimize_operand, at optabs.c:6888 with -O3


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69421

--- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
trippels@CFARM-IUT-TLSE3 ~ % cat octave.ii
template <typename> class A;
template <> struct A<double> {
  double m_fn1() { return _M_value; }
  double _M_value;
};
double a;
template <class X, class Y> void mx_inline_and(unsigned long, bool *p2, X, Y) {
  bool b;
  for (long i; i; i++) {
    A<double> x;
    b = x.m_fn1() || a;
    p2[i] = b;
  }
}
template <class R, class X, class Y>
void do_mm_binary_op(int, Y, void(unsigned long, R *, X, Y),
                     void(unsigned long, R *, X, Y),
                     void(unsigned long, R *, X, Y), char *);
int c;
void mx_el_and_m2() {
  do_mm_binary_op<bool, A<double>>(c, mx_el_and_m2, mx_inline_and,
                                   mx_inline_and, mx_inline_and, "");
}

trippels@CFARM-IUT-TLSE3 ~ % g++ -w -O3 octave.ii
octave.ii: In function âvoid mx_inline_and(long unsigned int, bool*, X, Y)
[with X = A<double>; Y = void (*)()]â:
octave.ii:7:34: error: type mismatch in conditional expression
 template <class X, class Y> void mx_inline_and(unsigned long, bool *p2, X, Y)
{
                                  ^~~~~~~~~~~~~

vector(16) unsigned char
vector(16) unsigned char
vector(2) <unnamed type>
vect_patt_15.42_168 = VEC_COND_EXPR <mask_patt_1.39_166, vect_cst__167,
mask__14.37_143>;
octave.ii:7:34: internal compiler error: verify_gimple failed

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]