1  /* CTF is not generated for entities not at file-scope.  */
       2  
       3  /* { dg-do compile )  */
       4  /* { dg-options "-O0 -gctf -dA" } */
       5  
       6  /* { dg-final { scan-assembler-times "ascii \"SFOO.0\"\[\t \]+\[^\n\]*ctf_string" 0 } } */
       7  /* { dg-final { scan-assembler-times "ascii \"gfoo.0\"\[\t \]+\[^\n\]*ctf_string" 0 } } */
       8  /* { dg-final { scan-assembler-times "ascii \"foo.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
       9  
      10  int foo (int n)
      11  {
      12    typedef struct { int a[n]; } SFOO;
      13  
      14    SFOO a;
      15    __attribute__ ((noinline)) SFOO gfoo (void) { return a; }
      16  
      17    a.a[0] = 1;
      18    a.a[9] = 2;
      19  
      20    SFOO b;
      21    b = gfoo ();
      22  
      23    return b.a[0] == 1 && b.a[9] == 2;
      24  }
      25