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 ipa/78555] gcc/sreal.c:232:20: runtime error: left shift of negative value -2018967552


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

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Another testcase for sreal.c

markus@x4 ~ % cat test.ii
struct A {
  A();
  A(const A &);
};
struct B {
  B(int);
};
template <class Predicate> struct C {
  B super_t;
  C(Predicate p1, int) : super_t(0), m_predicate(p1) {}
  Predicate m_predicate;
};
template <class Predicate, class Iterator>
void make_filter_iterator(Predicate p1, Iterator) {
  C<Predicate>(p1, 0);
}
main() {
  A a;
  auto p = [a] {};
  make_filter_iterator(p, 0);
}

markus@x4 ~ % /var/tmp/gcc_ubsan/usr/local/bin/g++ -c -O2 test.ii
../../gcc/gcc/sreal.c:232:20: runtime error: left shift of negative value
-1744830464

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