On Wed, 25 Mar 2020, Jakub Jelinek wrote:

> Hi!
> 
> As this test produces different code depending on whether
> __GCC_HAVE_DWARF2_CFI_ASM macro is defined or not, it is inherently
> incompatible with -fcompare-debug, as with
> -fcompare-debug -fno-asynchronous-unwind-tables -fno-exceptions
> the macro is defined only in the -g case and not otherwise.
> The purpose of the macro is to tell when the compiler is emitting
> .cfi* directives itself and thus it is desirable that user code uses them in
> inline asm as well, so I think it is fine the way it is.
> As -fexceptions makes the test pass even in that case because it emits
> .cfi* directives, the test actually doesn't FAIL even with
> make check-gcc 
> RUNTESTFLAGS='--target_board=unix/-fcompare-debug/-fno-asynchronous-unwind-tables/-fno-exceptions
>  dg.exp=cleanup-13.c'
> so the intent of this patch is help Martin and others who do run gcc tests
> out of the testsuite with random compiler flags to find out that this is a
> known issue.
> 
> Ok for trunk?

OK.

> 2020-03-25  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR debug/94296
>       * gcc.dg/cleanup-13.c: Add a comment that the test is not
>       -fcompare-debug compatible with certain other options.
> 
> --- gcc/testsuite/gcc.dg/cleanup-13.c.jj      2020-01-12 11:54:37.396398578 
> +0100
> +++ gcc/testsuite/gcc.dg/cleanup-13.c 2020-03-25 10:04:37.059790261 +0100
> @@ -1,3 +1,7 @@
> +/* This test is expected to FAIL to compile with
> +   -fcompare-debug -fno-asynchronous-unwind-tables -fno-exceptions
> +   because in that case, the __GCC_HAVE_DWARF2_CFI_ASM macro is only
> +   defined during -g compilation and not defined with -g0.  */
>  /* HP-UX libunwind.so doesn't provide _UA_END_OF_STACK */
>  /* { dg-do run } */
>  /* { dg-options "-fexceptions" } */
> 
>       Jakub
> 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)

Reply via email to