aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/ctf/ctf-variables-2.c
blob: 75c3ed790f4e24d59f001f5f52b48a37b457cf5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* CTF generation for static variables inside a function.

   In this testcase, CTF record for bstatic is NOT expected.  CTF generation
   is only carried out for variables at file-scope or global-scope.  */

/* { dg-do compile )  */
/* { dg-options "-O0 -gctf -dA" } */

/* { dg-final { scan-assembler-times "ctv_name" 0 } } */
/* { dg-final { scan-assembler-times "ascii \"bstatic.0\"\[\t \]+\[^\n\]*ctf_string" 0 } } */

int foo (int a)
{
  static int bstatic = 3;
  return a + bstatic;
}