This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/68772] New: Many -gstabs tests FAIL with Xcode 7 as


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

            Bug ID: 68772
           Summary: Many -gstabs tests FAIL with Xcode 7 as
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: iains at gcc dot gnu.org, mrs at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-apple-darwin15.2.0
            Target: x86_64-apple-darwin15.2.0
             Build: x86_64-apple-darwin15.2.0

When using the LLVM-based assembler bundled with Xcode 7 and up, many -gstabs*
tests FAIL:

FAIL: gcc.dg/debug/20020220-1.c -gstabs1 (test for excess errors)
Excess errors:
^[[1m/var/folders/1d/k16rgv6d5039jhvlj8_dzk4h00021y/T//cclVnbR6.s:1:9:
^[[0;1;31merror: ^[[0m^[[1munsupported directive '.stabs'
^[[0m        .stabs 
"/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/debug/20020220-1.c",100,0,2,Ltext0
^[[0;1;32m                ^

Obviously, the new assembler, unlike the old gas-based one, no longer supports
Stabs.  Apart from using a copy of an older assembler, I found that Xcode 7
still includes the old one, which is invoked if as -Q is called. 
Unfortunately,
that -Q option, while available in some previous versions of Xcode (6.4 for
example,
which still defaults to the gas-based assembler), older ones lack it, so this
cannot be used unconditionally.

While one could argue that the testsuite, which currently only checks if the
compiler
accepts the -gstabs* options, should also check if the assembler groks the
output,
there's not much point in the compiler acception options when it's known
that the assembler cannot deal with the output.

So the correct fix seems to check for .stabs support in the assembler and only
enable Stabs support if so.

  Rainer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]