diff options
author | Ian Lance Taylor <iant@golang.org> | 2023-06-21 11:04:04 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2023-06-21 11:04:04 -0700 |
commit | 97e31a0a2a2d2273687fcdb4e5416aab1a2186e1 (patch) | |
tree | d5c1cae4de436a0fe54a5f0a2a197d309f3d654c /gcc/testsuite/gcc.dg/debug | |
parent | 6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced (diff) | |
parent | 577223aebc7acdd31e62b33c1682fe54a622ae27 (diff) | |
download | gcc-97e31a0a2a2d2273687fcdb4e5416aab1a2186e1.zip gcc-97e31a0a2a2d2273687fcdb4e5416aab1a2186e1.tar.gz gcc-97e31a0a2a2d2273687fcdb4e5416aab1a2186e1.tar.bz2 |
Merge from trunk revision 577223aebc7acdd31e62b33c1682fe54a622ae27.
Diffstat (limited to 'gcc/testsuite/gcc.dg/debug')
17 files changed, 45 insertions, 22 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-anonymous-struct-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-anonymous-struct-1.c index 89a5701..05996fe 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-anonymous-struct-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-anonymous-struct-1.c @@ -11,10 +11,11 @@ /* { dg-options "-O0 -gbtf -dA" } */ /* Struct type with 2 members (struct foo). */ +/* { dg-final { scan-assembler-times " BTF_KIND_STRUCT 'foo'" 1 } } */ /* { dg-final { scan-assembler-times "\[\t \]0x4000002\[\t \]+\[^\n\]*btt_info" 1 } } */ /* Struct type with 1 member (anon struct). */ +/* { dg-final { scan-assembler-times " BTF_KIND_STRUCT ''" 1 } } */ /* { dg-final { scan-assembler-times "\[\t \]0x4000001\[\t \]+\[^\n\]*btt_info" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*btt_name" 1 } } */ struct foo { diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-anonymous-union-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-anonymous-union-1.c index f3b120bb..49cdc87 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-anonymous-union-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-anonymous-union-1.c @@ -9,9 +9,9 @@ /* Struct type with 1 member. */ /* { dg-final { scan-assembler-times "\[\t \]0x4000001\[\t \]+\[^\n\]*btt_info" 1 } } */ -/* Union type with 2 members. */ +/* Anonymous union type with 2 members. */ /* { dg-final { scan-assembler-times "\[\t \]0x5000002\[\t \]+\[^\n\]*btt_info" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*btt_name" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_UNION ''" 1 } } */ struct foo { diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-array-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-array-1.c index ab55445..967b1e8 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-array-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-array-1.c @@ -18,6 +18,9 @@ /* { dg-final { scan-assembler-times "\[\t \]0x5\[\t \]+\[^\n\]*bta_nelems" 1 } } */ /* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*bta_nelems" 1 } } */ +/* { dg-final { scan-assembler-times " bta_elem_type: \\(BTF_KIND_INT 'int'\\)" 4 } } */ +/* { dg-final { scan-assembler-times " bta_elem_type: \\(BTF_KIND_ARRAY ''\\)" 1 } } */ + int b1[2] = {0,1}; int c1[5] = {0,1,2,3,4}; int a1[2][3] = { {3,4,5}, {2,3,4} }; diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-2.c b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-2.c index 9665ab6..03c323a 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-2.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-2.c @@ -16,7 +16,7 @@ /* { dg-final { scan-assembler-times "\[\t \]0x20000020\[\t \]+\[^\n\]*btm_offset" 1 } } */ /* Only 2 members. */ -/* { dg-final { scan-assembler-times "btm_name" 2 } } */ +/* { dg-final { scan-assembler-times "MEMBER" 2 } } */ struct foo { diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c index 2984a33..78b8b7d 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c @@ -22,7 +22,7 @@ /* { dg-final { scan-assembler-times "\[\t \]0x84000001\[\t \]+\[^\n\]*btt_info" 1 } } */ /* Bitfield "f" points to type ID 1. */ -/* { dg-final { scan-assembler-times "\[\t \]0x1\[\t \]+\[^\n\]*btm_type" 1 } } */ +/* { dg-final { scan-assembler-times " btm_type: \\(BTF_KIND_ENUM 'foo'" 1 } } */ enum foo { diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c index af91845..c00c8b3 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c @@ -10,6 +10,7 @@ /* { dg-do compile } */ /* { dg-options "-O0 -gbtf -dA" } */ +/* { dg-require-effective-target size32plus } */ /* Struct with 3 members and no bitfield (kind_flag not set). */ /* { dg-final { scan-assembler-times "\[\t \]0x4000003\[\t \]+\[^\n\]*btt_info" 1 } } */ diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-2.c b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-2.c index f4b298c..d6f3358d 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-2.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-2.c @@ -6,8 +6,8 @@ /* { dg-options "-O0 -gbtf -dA" } */ /* Expect one DATASEC with vlen=1 (.foo_sec) and one with vlen=2 (.bar_sec) */ -/* { dg-final { scan-assembler-times "0xf000002\[\t \]+\[^\n\]*btt_info" 1 } } */ -/* { dg-final { scan-assembler-times "0xf000001\[\t \]+\[^\n\]*btt_info" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_DATASEC '.foo_sec'\[\\r\\n\]+\[^\\r\\n\]*0xf000001\[\t \]+\[^\n\]*btt_info" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_DATASEC '.bar_sec'\[\\r\\n\]+\[^\\r\\n\]*0xf000002\[\t \]+\[^\n\]*btt_info" 1 } } */ /* Function entries should have offset and size of 0 at compile time. */ /* { dg-final { scan-assembler-times "0\[\t \]+\[^\n\]*bts_offset" 3 } } */ diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c index 2887cb1..021ce03 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c @@ -5,6 +5,10 @@ /* { dg-final { scan-assembler-times "\[\t \]0x6000004\[\t \]+\[^\n\]*btt_info" 1 } } */ /* { dg-final { scan-assembler-times "\[\t \]0x86000003\[\t \]+\[^\n\]*btt_info" 1 } } */ +/* { dg-final { scan-assembler-times " ENUM_CONST 'QAD' idx=0" 1 } } */ +/* { dg-final { scan-assembler-times " ENUM_CONST 'QED' idx=1" 1 } } */ +/* { dg-final { scan-assembler-times " ENUM_CONST 'QOD' idx=2" 1 } } */ +/* { dg-final { scan-assembler-times " ENUM_CONST 'QUD' idx=3" 1 } } */ /* { dg-final { scan-assembler-times "ascii \"QAD.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ /* { dg-final { scan-assembler-times "ascii \"QED.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ /* { dg-final { scan-assembler-times "ascii \"QOD.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-function-3.c b/gcc/testsuite/gcc.dg/debug/btf/btf-function-3.c index 884d25c..7ca0890 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-function-3.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-function-3.c @@ -1,6 +1,6 @@ /* Test BTF generation for a function with an unrepresentable parameter. - BTF has no encoding for floating point types, among others. Function + BTF has no encoding for vector types, among others. Function parameters of unrepresentable types are emitted as 'void' types. We expect one BTF_KIND_FUNC_PROTO with 3 parameters, one of which diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-function-6.c b/gcc/testsuite/gcc.dg/debug/btf/btf-function-6.c index 48a946a..e014d99 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-function-6.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-function-6.c @@ -6,8 +6,8 @@ /* { dg-do compile } */ /* { dg-options "-O0 -gbtf -dA" } */ -/* { dg-final { scan-assembler-times "btt_info: kind=12, kflag=0, linkage=2" 1 } } */ -/* { dg-final { scan-assembler-times "btt_info: kind=12, kflag=0, linkage=1" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_FUNC\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*linkage=2\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_FUNC_PROTO 'extfunc'" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_FUNC\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*linkage=1\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_FUNC_PROTO 'foo'" 1 } } */ extern int extfunc(int a, int b); diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-pointers-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-pointers-1.c index a14ac0f..f80d8089 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-pointers-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-pointers-1.c @@ -9,6 +9,9 @@ /* { dg-options "-O0 -gbtf -dA" } */ /* { dg-final { scan-assembler-times "\[\t \]0x2000000\[\t \]+\[^\n\]*btt_info" 2 } } */ +/* { dg-final { scan-assembeler-times " BTF_KIND_PTR ''\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_INT 'int'"}} */ +/* { dg-final { scan-assembeler-times " BTF_KIND_PTR ''\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_STRUCT 'st'"}} */ + /* { dg-final { scan-assembler-times "ascii \"int.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ /* { dg-final { scan-assembler-times "ascii \"st.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-struct-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-struct-1.c index bc32814..79156cd 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-struct-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-struct-1.c @@ -9,7 +9,9 @@ /* { dg-final { scan-assembler-times "\[\t \]0x4000003\[\t \]+\[^\n\]*btt_info" 1 } } */ /* { dg-final { scan-assembler-times "\[\t \]0x4000002\[\t \]+\[^\n\]*btt_info" 1 } } */ -/* { dg-final { scan-assembler-times "btm_name" 5 } } */ +/* { dg-final { scan-assembler-times " btm_type: \\(BTF_KIND_INT" 3 } } */ +/* { dg-final { scan-assembler-times " btm_type: \\(BTF_KIND_ARRAY" 1 } } */ +/* { dg-final { scan-assembler-times " btm_type: \\(BTF_KIND_STRUCT" 1 } } */ struct foo { diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-struct-2.c b/gcc/testsuite/gcc.dg/debug/btf/btf-struct-2.c index c3aff09..e9ff068 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-struct-2.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-struct-2.c @@ -1,7 +1,7 @@ /* Test BTF generation for struct type with a member which refers to an unsupported type. - BTF does not support floating point types (among other things). When + BTF does not support vector types (among other things). When generating BTF for a struct (or union) type, members which refer to unsupported types should be skipped. */ diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-typedef-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-typedef-1.c index 472cc63..36bbb29 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-typedef-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-typedef-1.c @@ -41,13 +41,13 @@ /* { dg-final { scan-assembler-times "ascii \"node_t.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ /* { dg-final { scan-assembler-times "ascii \"arena_t.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0x2\[\t \]+\[^\n\]*btv_type" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0x3\[\t \]+\[^\n\]*btv_type" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0x4\[\t \]+\[^\n\]*btv_type" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0x6\[\t \]+\[^\n\]*btv_type" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0x8\[\t \]+\[^\n\]*btv_type" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0xb\[\t \]+\[^\n\]*btv_type" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0xf\[\t \]+\[^\n\]*btv_type" 1 } } */ +/* { dg-final { scan-assembler "BTF_KIND_VAR 'a'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_TYPEDEF 'my_int'" } } */ +/* { dg-final { scan-assembler "BTF_KIND_VAR 'b'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_TYPEDEF 'foo_int'" } } */ +/* { dg-final { scan-assembler "BTF_KIND_VAR 'c'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_TYPEDEF 'bar_int'" } } */ +/* { dg-final { scan-assembler "BTF_KIND_VAR 'd'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_TYPEDEF 'node_t'" } } */ +/* { dg-final { scan-assembler "BTF_KIND_VAR 'destination'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_TYPEDEF 'CBAR'" } } */ +/* { dg-final { scan-assembler "BTF_KIND_VAR 'ticket'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_TYPEDEF 'CBARP'" } } */ +/* { dg-final { scan-assembler "BTF_KIND_VAR 'suitcase'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_TYPEDEF 'arena_t'" } } */ typedef int my_int; typedef int foo_int; diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-union-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-union-1.c index d668437..e3a1902 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-union-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-union-1.c @@ -5,7 +5,7 @@ /* One union type with 4 members */ /* { dg-final { scan-assembler-times "\[\t \]0x5000004\[\t \]+\[^\n\]*btt_info" 1 } } */ -/* { dg-final { scan-assembler-times "btm_name" 4 } } */ +/* { dg-final { scan-assembler-times "MEMBER" 4 } } */ union onion { diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-variables-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-variables-1.c index a79ed1d..42503df 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-variables-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-variables-1.c @@ -5,6 +5,12 @@ /* We expect 6 variables */ /* { dg-final { scan-assembler-times "\[\t \]0xe000000\[\t \]+\[^\n\]*btv_info" 6 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'x1'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_INT" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'bar'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_UNION" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'lala'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_ENUM" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'arr'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_ARRAY" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'plong'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_PTR" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'st_inst'\[\\r\\n\]+\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\\(BTF_KIND_STRUCT 'st'" 1 } } */ unsigned int x1; diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-variables-2.c b/gcc/testsuite/gcc.dg/debug/btf/btf-variables-2.c index db0bdd7..5f0c0b6 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-variables-2.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-variables-2.c @@ -1,7 +1,7 @@ /* BTF generation for variables with removed type. - BTF does not support floating point types, so no representation for the type - 'float' will be emitted. In this test, we check to also ensure that the + BTF does not support vector types, so no representation for the type + of 'bar' will be emitted. In this test, we check to also ensure that the variable 'bar' is not emitted, as it references a type that is not supported in BTF. */ @@ -11,6 +11,9 @@ /* We expect only 3 variables. */ /* { dg-final { scan-assembler-times "\[\t \]0xe000000\[\t \]+\[^\n\]*btv_info" 3 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'foo'" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'baz'" 1 } } */ +/* { dg-final { scan-assembler-times " BTF_KIND_VAR 'myst'" 1 } } */ /* { dg-final { scan-assembler-times "ascii \"foo.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ /* { dg-final { scan-assembler-times "ascii \"baz.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ /* { dg-final { scan-assembler-times "ascii \"myst.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */ |