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 c++/65678] internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:909


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

--- Comment #1 from David Kredba <nheghathivhistha at gmail dot com> ---
C-reduced test case:

extern "C" void *memmove(void *, const void *, unsigned long);
long a;
template <class, class Source> int BitCast(Source &p1) {
  memmove(&a, &p1, sizeof a);
  return a;
}

static int double_to_uint64(double p1) { return BitCast<int>(p1); }

class A {
public:
  A(double p1) : d64_(double_to_uint64(p1)) {}
  int m_fn1();
  int m_fn2() {
    int b;
    b = d64_;
    if (b)
      return 0;
  }
  int d64_;
};

void FillFractionals();
void FastFixedDtoa(double p1) {
  int c = A(p1).m_fn2(), d = A(p1).m_fn1();
  if (d)
    FillFractionals();
}


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