1  /* CTF generation of function pointers.  */
       2  
       3  /* { dg-do compile )  */
       4  /* { dg-options "-O0 -gctf -dA" } */
       5  /* { dg-final { scan-assembler-times "\[\t \]0x16000001\[\t \]+\[^\n\]*ctt_info" 1 } } */
       6  /* { dg-final { scan-assembler-times "\[\t \]0x16000002\[\t \]+\[^\n\]*ctt_info" 1 } } */
       7  /* { dg-final { scan-assembler-times "\[\t \]0x16000003\[\t \]+\[^\n\]*ctt_info" 1 } } */
       8  /* { dg-final { scan-assembler-times "ascii \"__foo_fn.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
       9  /* { dg-final { scan-assembler-times "ascii \"destroy.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
      10  /* { dg-final { scan-assembler-times "ascii \"func.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
      11  
      12  int (*func) (int *, char);
      13  
      14  typedef int (*__foo_fn) (void *__cookie, char *__buf, int __nbytes);
      15  
      16  typedef struct object
      17  {
      18     int myint;
      19     char mychar;
      20     void (*destroy)(struct object *);
      21  } object_t;
      22  
      23  object_t myobj;
      24  __foo_fn fooit;