(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
debug/
ctf/
ctf-attr-mode-1.c
       1  /* Test CTF generation works well with ((mode)) attribute.
       2  
       3     In this testcase, CTF should report type of bqi to be an enum and
       4     not an int.  Also, CTF for typedef of enum should exist.  However, there
       5     are no direct and portable methods of checking that a CTF type / CTF
       6     variable refers to a specific CTF type, so this testcase merely asserts
       7     for existence of individual CTF records.  */
       8  
       9  /* { dg-do compile )  */
      10  /* { dg-options "-O0 -gctf -dA" } */
      11  
      12  /* { dg-final { scan-assembler-times "ascii \"B1.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
      13  /* { dg-final { scan-assembler-times "ascii \"B2.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
      14  /* { dg-final { scan-assembler-times "ascii \"B3.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
      15  /* { dg-final { scan-assembler-times "cte_value" 3} } */
      16  
      17  /* There are no better/direct methods to assert that the CTF for typedef of
      18     enum has been added.  */
      19  /* { dg-final { scan-assembler-times "\[\t \]0x22000003\[\t \]+\[^\n\]*ctt_info" 1 } } */
      20  /* { dg-final { scan-assembler-times "\[\t \]0x2a000000\[\t \]+\[^\n\]*ctt_info" 1 } } */
      21  
      22  typedef enum { B1 = 1, B2 = 2, B3 = 3 } B;
      23  B __attribute__ ((mode (QI))) bqi;