This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Suppress explicit dwarf2 tests under Clang due to reliance on global inline asm ordering
- From: Pedro Alves <palves at redhat dot com>
- To: David Blaikie <dblaikie at gmail dot com>
- Cc: Eric Christopher <echristo at gmail dot com>, Doug Evans <dje at google dot com>, gdb-patches at sourceware dot org
- Date: Thu, 01 May 2014 09:30:57 +0100
- Subject: Re: [PATCH] Suppress explicit dwarf2 tests under Clang due to reliance on global inline asm ordering
- Authentication-results: sourceware.org; auth=none
- References: <CAENS6EtU-0ReLWH8kOU8GWw41i5OKnFzMt6sCHtnuu3ryXJ+_A at mail dot gmail dot com>
On 04/08/2014 10:22 PM, David Blaikie wrote:
> (contrary to my prior claim, I do seem to have commit after review
> access to gdb (I see my name in the commit log) - I'll just have to
> figure out how to do that... - so I just need approval, don't need
> someone to commit this for me)
>
> These were all the tests that I could find that had "asm.*\.globl" in
> a c file. All of them had failures under Clang except for
> dw2-unresolved.exp, though the resulting dwarf would still be
> incorrect in that test it was just "getting lucky", I suppose. For
> sanity I disabled it as well.
>
> "unsupported" seemed like the right result to use according to
> http://ftp.gnu.org/old-gnu/Manuals/dejagnu-1.3/html_chapter/dejagnu_3.html
> - even though "untested" seems to be often used synonymously (the
> dejagnu manual seems to indicate that untested shouldn't be used for
> these sort of cases where there is test coverage it just can't be run
> in this configuration).
>
> From the commit message/ChangeLog:
>
> Flag explicit dwarf2 tests as unsupported under Clang.
>
> Clang doesn't guarantee ordering of global and namespace scope inline
> asm relative to other entities, even at -O0.
You mean that the asms might end up emitted with order swapped, or
that other code might end up in between them? I suspect the latter.
Can please you show a GCC vs clang example? If indeed the latter,
this is something that GCC itself might do too with optimization
enabled, right?
--
Pedro Alves