In this case, they were all harmless in reality (no diff in test logs).
gcc/testsuite/ChangeLog:
* gcc.dg/debug/btf/btf-array-1.c: Fix dg-do directive syntax.
* gcc.dg/debug/btf/btf-bitfields-1.c: Ditto.
* gcc.dg/debug/btf/btf-bitfields-2.c: Ditto.
* gcc.dg/debug/btf/btf-datasec-1.c: Ditto.
* gcc.dg/debug/btf/btf-union-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-anonymous-struct-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-anonymous-union-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-array-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-array-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-array-4.c: Ditto.
* gcc.dg/debug/ctf/ctf-array-5.c: Ditto.
* gcc.dg/debug/ctf/ctf-array-6.c: Ditto.
* gcc.dg/debug/ctf/ctf-attr-mode-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-attr-used-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-bitfields-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-bitfields-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-bitfields-3.c: Ditto.
* gcc.dg/debug/ctf/ctf-bitfields-4.c: Ditto.
* gcc.dg/debug/ctf/ctf-complex-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-cvr-quals-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-cvr-quals-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-cvr-quals-3.c: Ditto.
* gcc.dg/debug/ctf/ctf-cvr-quals-4.c: Ditto.
* gcc.dg/debug/ctf/ctf-enum-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-enum-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-file-scope-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-float-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-forward-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-forward-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-func-index-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-function-pointers-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-function-pointers-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-function-pointers-3.c: Ditto.
* gcc.dg/debug/ctf/ctf-function-pointers-4.c: Ditto.
* gcc.dg/debug/ctf/ctf-functions-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-int-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-objt-index-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-pointers-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-pointers-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-preamble-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-str-table-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-struct-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-struct-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-struct-array-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-struct-array-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-typedef-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-typedef-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-typedef-3.c: Ditto.
* gcc.dg/debug/ctf/ctf-typedef-struct-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-typedef-struct-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-typedef-struct-3.c: Ditto.
* gcc.dg/debug/ctf/ctf-union-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-variables-1.c: Ditto.
* gcc.dg/debug/ctf/ctf-variables-2.c: Ditto.
* gcc.dg/debug/ctf/ctf-variables-3.c: Ditto.
a1 : cta_nelems = 2, 5
buf : cta_nelems = 0. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gbtf -dA" } */
/* { dg-final { scan-assembler-times "0x3000000\[\t \]+\[^\n\]*btt_info" 5 } } */
- (0x13 << 24) | 0x40 - note that this is aligned to 0x40.
- (0x13 << 24) | 0x31 - in case structures are packed. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gbtf -dA" } */
/* { dg-require-effective-target int32plus } */
We expect a struct with 2 members to be generated. The size 0 bitfield
should not have any entry in the member list. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gbtf -dA" } */
/* Struct with bitfield members, and 2 members. */
+
/* BTF generation of BTF_KIND_DATASEC records.
We expect 3 DATASEC records: one for each of .data, .rodata and .bss.
so we cannot check them.
*/
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gbtf -dA" } */
/* { dg-additional-options "-msdata=none" { target { { powerpc*-*-* } && ilp32 } } } */
/* { dg-additional-options "-msmall-data-limit=0" { target { riscv*-*-* } } } */
/* Test BTF generation for union type. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gbtf -dA" } */
/* One union type with 4 members */
struct a : ctt_info = 0x1a000002 (2 fields)
struct {} : ctt_info = 0x1a000001 (1 field) */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*ctt_name" 1 } } */
struct anon_union : ctt_info = 0x1a000001 (1 field)
union {} : ctt_info = 0x1e000002 (2 fields) */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*ctt_name" 1 } } */
a1 : cta_nelems = 2, 5
buf : cta_nelems = 0. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "0x12000000\[\t \]+\[^\n\]*ctt_info" 5 } } */
In this testcase, two CTF array records each of type int [0] is expected. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "0x12000000\[\t \]+\[^\n\]*ctt_info" 2 } } */
Test CTF generation for single element arrays. In this testcase, one CTF
record for array is expected with cta_nelems = 1. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "0x12000000\[\t \]+\[^\n\]*ctt_info" 1 } } */
*/
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "0x12000000\[\t \]+\[^\n\]*ctt_info" 1 } } */
/* CTF generation for multidimensional array. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]+0x2\[\t \]+\[^\n\]*cta_nelems" 1 } } */
variable refers to a specific CTF type, so this testcase merely asserts
for existence of individual CTF records. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ascii \"B1.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
This attribute, attached to a function, means that code must be emitted for
the function even if it appears that the function is not referenced. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O2 -gctf -dA" } */
/* These should be true for higher optimization levels. */
In this testcase, two slices are expected - one for enum and the other for
int. CTF slices are unnamed records. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x2\[\t \]+\[^\n\]*cts_bits" 1 } } */
across targets with different BIT_PER_WORD. Is there a way to add
cts_offset related checks in the testcase? */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x6\[\t \]+\[^\n\]*cts_type" 3 } } */
/* The bool bitfield type. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x2\[\t \]+\[^\n\]*cts_type" 2 } } */
In this testcase, two slices are expected. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x2\[\t \]+\[^\n\]*cts_type" 2 } } */
This testcase has a mix of C constructs containing COMPLEX_TYPE. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-require-effective-target libc_has_complex_functions } */
10: void (*) (size_t, int *restrict, const int *restrict) (size 0x0)
*/
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-options "-O0 -gctf -gdwarf-4 -dA" { target { *-*-darwin* } } } */
two const qualifier CTF records are expected (const int and const struct
s1). */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ascii \"int.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
In this testcase, it is expected to have const and volatile CTF
records. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ascii \"unsigned char.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
is 1 const qualifier. 1 more no-name CTF record corresponds to the CTF
pointer record. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*ctt_name" 2 } } */
/* CTF generation for enums. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ascii \"RED.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
In this testcase, CTF for enumerator GFS_MONOTONIC will not be generated. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ascii \"GFS_MONOTONIC.0\"\[\t \]+\[^\n\]*ctf_string" 0 } } */
/* CTF is not generated for entities not at file-scope. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ascii \"SFOO.0\"\[\t \]+\[^\n\]*ctf_string" 0 } } */
/* Tests for CTF float base types.
- Verify that there is a single record for the base types. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ascii \"float.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
/* { dg-final { scan-assembler-times "ascii \"double.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
type. The second assembler tag is due to a ref type in a CVR CTF record.
TBD - perhaps a more robust string pattern is needed. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x26000000\[\t \]+\[^\n\]*ctt_info" 2 } } */
For forward types, the compiler encodes the CTF kind in the ctt_type field.
CTF_K_FORWARD is used as the CTF type as usual in the ctt_info. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x26000000\[\t \]+\[^\n\]*ctt_info" 1 } } */
In this testcase, 2 records in the function index section are expected. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "funcinfo_name" 2 } } */
/* CTF generation of function pointers. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x16000001\[\t \]+\[^\n\]*ctt_info" 1 } } */
/* { dg-final { scan-assembler-times "\[\t \]0x16000002\[\t \]+\[^\n\]*ctt_info" 1 } } */
In this testcase, there is a single function type expected for two
different function pointer types. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x16000001\[\t \]+\[^\n\]*ctt_info" 1 } } */
/* { dg-final { scan-assembler-times "ascii \"rcu_callback_t.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
In this testcase, there is a single function type expected. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x16000001\[\t \]+\[^\n\]*ctt_info" 1 } } */
/* { dg-final { scan-assembler-times "ascii \"foo_init_callback.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
In this testcase, Type de-duplication of function type is exercised. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x16000001\[\t \]+\[^\n\]*ctt_info" 1 } } */
/* { dg-final { scan-assembler-times "ascii \"var_assign_func_t.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
*/
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x16000002\[\t \]+\[^\n\]*ctt_info" 1 } } */
/* Tests for CTF integer base types.
- Verify that there is a single record for the base types. */
-/* { dg-do compile ) */
+/* { 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 "ascii \"short int.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
In this testcase, 4 records in the object index section are expected. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "objtinfo_name" 4 } } */
- struct foo_struct *
*/
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ascii \"foo_struct.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
In this testcase, one CTF pointer type record is expected. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0xe000000\[\t \]+\[^\n\]*ctt_info" 1 } } */
/* Verify the CTF preamble in the CTF section. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler "0xdff2.*CTF preamble magic number" } } */
/* { dg-final { scan-assembler "0x4.*CTF preamble version" } } */
single empty string. Just an optimization by the compiler, it is not
mandated by the CTF format. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ascii \".0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
struct b : ctt_into = 0x1a000002 (2 field members)
*/
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x1a000004\[\t \]+\[^\n\]*ctt_info" 1 } } */
Further, the compiler is expected to generate a single CTF struct type for
struct dmx_dtdef (due to Type de-duplication at CTF generation). */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ascii \"dmx_dtdef.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
/* { dg-final { scan-assembler-times "ascii \"dtd_name.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
Deemed as acceptable for now. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ascii \"cmodel.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
the location. CTF generation feeds off DWARF dies; this testcase tests
that the location expr is handled. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA -gdwarf-2" } */
/* { dg-final { scan-assembler-times "0x12000000\[\t \]+\[^\n\]*ctt_info" 1 } } */
unique (type of a, b, c will all point to int); hence, the check.
*/
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "0x2a000000\[\t \]+\[^\n\]*ctt_info" 7 } } */
In this testcase, typedef of type void should be generated. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "0x2a000000\[\t \]+\[^\n\]*ctt_info" 1 } } */
In this testcase, a single CTF record for typedef is expected. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "0x2a000000\[\t \]+\[^\n\]*ctt_info" 1 } } */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
typedef struct my_int
/* Test compilation of typedef composition in structs. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
typedef struct
4: const my_int_t (size 0x8) -> 3: my_int_t (size 0x8) -> 1: struct my_int (size 0x8)
*/
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x4\[\t \]+\[^\n\]*ctv_typeidx" 1 } } */
/* CTF generation for union type. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "\[\t \]0x1e000004\[\t \]+\[^\n\]*ctt_info" 1 } } */
/* { dg-final { scan-assembler-times "ctm_name" 4 } } */
In this testcase, 7 records in the variable info section are expected. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ctv_name" 7 } } */
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-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "ctv_name" 0 } } */
single CTF variable and a single entry in the CTF object info section
are expected. */
-/* { dg-do compile ) */
+/* { dg-do compile } */
/* { dg-options "-O0 -gctf -dA" } */
/* { dg-final { scan-assembler-times "0x12000000\[\t \]+\[^\n\]*ctt_info" 2 } } */