aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/ctf/ctf-function-pointers-3.c
blob: fe35d6c7f2e227a5561b53afa4eb22b450cc89ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* CTF generation of function pointers.

   In this testcase,  there is a single function type expected.  */

/* { dg-do compile )  */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x16000001\[\t \]+\[^\n\]*ctt_info" 1 } } */
/* { dg-final { scan-assembler-times "ascii \"foo_init_callback.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
/* { dg-final { scan-assembler-times "ascii \"fn.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */

struct foo;

typedef void (* foo_init_callback) (struct foo *f1);

struct foo
{
  /* Function to call to initialize.  */
  foo_init_callback fn;
};

struct foo f;