aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-2.c
blob: 4f328f3a5ac0277c10efc9ab5df5deaa941b1004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* Test compilation of stubs with various expressions involving const
   qualifier.
   
   In this testcase, a single CTF record for const int is expected. A total of
   two const qualifier CTF records are expected (const int and const struct
   s1).  */

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

/* { dg-final { scan-assembler-times "ascii \"int.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
/* { dg-final { scan-assembler-times "\[\t \]0x32000000\[\t \]+\[^\n\]*ctt_info" 2 } } */

struct mystruct
{
  struct
    {
      int a; 
      const int b;
    } s1;
  char * name;
} my_a;

struct s1
{
  int i;
  const int ci;
} s;

const struct s1 cs;