aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ubsan/pr66452.C
blob: 473543ca8999884412ff44d0f660f5fe7dbec9cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR sanitizer/66452
// { dg-do compile }
// { dg-options "-Wall -fsanitize=undefined" }

class A {
public:
  A(int);
};
class B {
  A m_fn1() const;
};
A B::m_fn1() const {
  for (int i = 0;i;)
    ;
  return 0;
}