[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / ubsan / pr66452.C
blob473543ca8999884412ff44d0f660f5fe7dbec9cc
1 // PR sanitizer/66452
2 // { dg-do compile }
3 // { dg-options "-Wall -fsanitize=undefined" }
5 class A {
6 public:
7   A(int);
8 };
9 class B {
10   A m_fn1() const;
12 A B::m_fn1() const {
13   for (int i = 0;i;)
14     ;
15   return 0;