aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ubsan/pr71393.C
blob: 6011e3a8de0a27e143bea3b8e636092fd615be5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/71393
// { dg-do compile }
// { dg-options "-fsanitize=undefined" }

struct B { B &operator << (long); };
struct A { A (); long a, b, c, d, e, f; };

A::A ()
{
  B q;
  q << 0 << a << 0 << b << 0 << (b / a) << 0 << c << 0 << (c / a) << 0
    << d << 0 << (d / a) << 0 << e << 0 << (e / a) << 0 << f << 0
    << (f / a) << 0;
}