public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2093] CTF testsuite: Remove explicit check on ctv_typeidx
@ 2021-07-06 23:05 Indu Bhagat
  0 siblings, 0 replies; only message in thread
From: Indu Bhagat @ 2021-07-06 23:05 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:97bcacfb5ac49afa4e305489dd110cc446451549

commit r12-2093-g97bcacfb5ac49afa4e305489dd110cc446451549
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date:   Tue Jul 6 16:02:38 2021 -0700

    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  <indu.bhagat@oracle.com>
    
    gcc/testsuite/ChangeLog:
    
            PR debug/101283
            * gcc.dg/debug/ctf/ctf-attr-mode-1.c: Remove the check for ctv_typeidx.

Diff:
---
 gcc/testsuite/gcc.dg/debug/ctf/ctf-attr-mode-1.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

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 fc3af037b8b..c4801a726d2 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-06 23:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 23:05 [gcc r12-2093] CTF testsuite: Remove explicit check on ctv_typeidx Indu Bhagat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).