summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ubsan/pr81209.C
blob: 3f2a576890770fe450050234ad9154698262993f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR sanitizer/81209
// { dg-do compile }
// { dg-options "-fsanitize=undefined -fno-declone-ctor-dtor" }

#ifdef __SIZEOF_INT128__
typedef __int128 T;
#else
typedef long long int T;
#endif

struct B {};
struct A : virtual public B
{
  A (long);
  T a;
};

A::A (long c)
{
  long b = a % c;
}