From b7807e11c4d56ffc299a15e727ab3bf670d0fb8e Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 9 Oct 2017 09:20:38 +0000 Subject: [PATCH] Fix gcc.dg/cold-1.c 2017-10-09 Tom de Vries * gcc.dg/cold-1.c (foo1): Fix warning line number. Make warning line number relative. (abort): Declare. From-SVN: r253537 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/cold-1.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c2a658c3dcf..37b33efe016 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-10-09 Tom de Vries + + * gcc.dg/cold-1.c (foo1): Fix warning line number. Make warning line + number relative. + (abort): Declare. + 2017-10-08 Eric Botcazou * gcc.c-torture/execute/20171008-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/cold-1.c b/gcc/testsuite/gcc.dg/cold-1.c index 8ea88dd79a3..ba1cd3a4e62 100644 --- a/gcc/testsuite/gcc.dg/cold-1.c +++ b/gcc/testsuite/gcc.dg/cold-1.c @@ -1,11 +1,12 @@ /* { dg-do compile { target nonpic } } */ /* { dg-options "-O2 -Wsuggest-attribute=cold" } */ +extern void abort (void); extern void do_something_interesting_and_never_return (); int foo1(int a) -{ /* { dg-warning "cold" "detect cold candidate" { target *-*-* } "8" } */ +{ /* { dg-warning "cold" "detect cold candidate" { target *-*-* } ".-1" } */ if (a) abort (); else -- 2.30.2