From: Indu Bhagat Date: Tue, 6 Jul 2021 23:02:38 +0000 (-0700) Subject: CTF testsuite: Remove explicit check on ctv_typeidx X-Git-Tag: basepoints/gcc-13~6220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97bcacfb5ac49afa4e305489dd110cc446451549;p=thirdparty%2Fgcc.git CTF testsuite: Remove explicit check on ctv_typeidx The value of ctv_typeidx is the CTF type ID of the data type of the associated variable. The order in which the CTF types are added can change across platforms and also as the code evolves, hence changing the CTF type ID. As there is no direct and portable method of testing that the data type of a CTF variable is of a specific kind, remove the check on ctv_typeidx. This also fixes a subset of failures as seen on Darwin. 2021-07-06 Indu Bhagat gcc/testsuite/ChangeLog: PR debug/101283 * gcc.dg/debug/ctf/ctf-attr-mode-1.c: Remove the check for ctv_typeidx. --- diff --git a/gcc/testsuite/gcc.dg/debug/ctf/ctf-attr-mode-1.c b/gcc/testsuite/gcc.dg/debug/ctf/ctf-attr-mode-1.c index fc3af037b8bd..c4801a726d28 100644 --- a/gcc/testsuite/gcc.dg/debug/ctf/ctf-attr-mode-1.c +++ b/gcc/testsuite/gcc.dg/debug/ctf/ctf-attr-mode-1.c @@ -1,7 +1,10 @@ /* Test CTF generation works well with ((mode)) attribute. In this testcase, CTF should report type of bqi to be an enum and - not an int. */ + not an int. Also, CTF for typedef of enum should exist. However, there + are no direct and portable methods of checking that a CTF type / CTF + variable refers to a specific CTF type, so this testcase merely asserts + for existence of individual CTF records. */ /* { dg-do compile ) */ /* { dg-options "-O0 -gctf -dA" } */ @@ -16,7 +19,5 @@ /* { dg-final { scan-assembler-times "\[\t \]0x22000003\[\t \]+\[^\n\]*ctt_info" 1 } } */ /* { dg-final { scan-assembler-times "\[\t \]0x2a000000\[\t \]+\[^\n\]*ctt_info" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0x3\[\t \]+\[^\n\]*ctv_typeidx" 1} } */ - typedef enum { B1 = 1, B2 = 2, B3 = 3 } B; B __attribute__ ((mode (QI))) bqi;