From: Tom de Vries Date: Mon, 9 Oct 2017 09:20:38 +0000 (+0000) Subject: Fix gcc.dg/cold-1.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b7807e11c4d56ffc299a15e727ab3bf670d0fb8e;p=gcc.git 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 --- 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