https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101283

--- Comment #12 from Indu Bhagat <ibhagatgnu at gmail dot com> ---
The intention is to be able to generate CTF/BTF correctly irrespective of the
DWARF version.

The case of DW_TAG_restrict_type is unique though, and looks like we will need
special handling.  To be specific, the 'restrict' keyword related failures are:
  - gcc.dg/debug/ctf/ctf-cvr-quals-1.c
  - gcc.dg/debug/btf/btf-cvr-quals-1.c 
DW_TAG_restrict_type is not generated for DWARF-2. So, adding a target specific
option for these looks like a reasonable way forward.

So for the btf testcase, something like - 
/* { dg-options "-O0 -gbtf -dA -gdwarf-4" { target { *-*-darwin* } } } */

Next, for some of the *-bitfield-*.c test failures, the issue can be masked
away by forcing -gdwarf-4, yes. But the correct fix can be done in dwarf2ctf.c
and with that, there is not need to force a -gdwarf-4 in those tests.

I will post a patch for these two soon.

Reply via email to