summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr78112-2.C
blob: c174bd3121552a90050199a10f5cf1f8ea9a6d56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-skip-if "No dwarf debug support" { hppa*-*-hpux* } } */
/* { dg-options "-g -dA -gdwarf-4 -std=gnu++11" } */
/* { dg-options "-g -dA -std=gnu++11 -gdwarf-4" } */
/* { dg-final { scan-assembler-times DW_AT_object_pointer 18 } } */

void run (int *int_p, void(*func)(int *)) { func (int_p); }
namespace foo {
   struct Foo {
      int a;
      Foo() { run (&a, [](int *int_p) { *int_p = 0; }); }
   };
}
int main (void) { foo::Foo f; }