Avoid cc1 SEGV in gcc.dg/rtl/x86_64/final.c (PR target/79975)

Message ID yddmv0ue628.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show
Series
  • Avoid cc1 SEGV in gcc.dg/rtl/x86_64/final.c (PR target/79975)
Related show

Commit Message

Rainer Orth Jan. 31, 2018, 9:22 a.m.
As described in the PR, cc1 SEGVs compiling gcc.dg/rtl/x86_64/final.c on
targets that default to -fno-dwarf2-cfi-asm.  However, the test is
compile-only, so doesn't depend on the toolchain's support for cfi
directives.  Besides, it scans the output for those, so depends on
-fdwarf2-cfi-asm anyway, so I'm adding it explicitly.

Tested with the appropriate runtest invocation on i386-pc-solaris2.11
with as (-fno-dwarf2-cfi-asm default), gas (-fdwarf2-cfi-asm default),
and x86_64-pc-linux-gnu.

Ok for mainline and gcc-7 branch?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2018-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR target/79975
	* gcc.dg/rtl/x86_64/final.c: Add -fdwarf2-cfi-asm to dg-options.

Comments

Rainer Orth Feb. 6, 2018, 10:33 a.m. | #1
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> As described in the PR, cc1 SEGVs compiling gcc.dg/rtl/x86_64/final.c on

> targets that default to -fno-dwarf2-cfi-asm.  However, the test is

> compile-only, so doesn't depend on the toolchain's support for cfi

> directives.  Besides, it scans the output for those, so depends on

> -fdwarf2-cfi-asm anyway, so I'm adding it explicitly.

>

> Tested with the appropriate runtest invocation on i386-pc-solaris2.11

> with as (-fno-dwarf2-cfi-asm default), gas (-fdwarf2-cfi-asm default),

> and x86_64-pc-linux-gnu.

>

> Ok for mainline and gcc-7 branch?


There were no comments in a week and I'm pretty confident the patch
counts as obvious, so I've checked it into mainline and gcc-7 branch.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Patch

# HG changeset patch
# Parent  0ad00b4e31e7baacada8d0f469c7e045f49a41ea
Avoid cc1 SEGV in gcc.dg/rtl/x86_64/final.c (PR target/79975)

diff --git a/gcc/testsuite/gcc.dg/rtl/x86_64/final.c b/gcc/testsuite/gcc.dg/rtl/x86_64/final.c
--- a/gcc/testsuite/gcc.dg/rtl/x86_64/final.c
+++ b/gcc/testsuite/gcc.dg/rtl/x86_64/final.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
-/* { dg-options "-fdump-rtl-final" } */
+/* { dg-options "-fdwarf2-cfi-asm -fdump-rtl-final" } */
 
 /* Lightly-modified dump of test.c.304r.dwarf2 for x86_64 target,
    with various NOTE_INSN_CFI deleted by hand for now.  */