On 07/24/2017 08:56 PM, Jan Hubicka wrote: > * gcc.dg/cold-1.c: New testcase. > Index: testsuite/gcc.dg/cold-1.c > =================================================================== > --- testsuite/gcc.dg/cold-1.c (revision 0) > +++ testsuite/gcc.dg/cold-1.c (working copy) > @@ -0,0 +1,21 @@ > +/* { dg-do compile { target nonpic } } */ > +/* { dg-options "-O2 -Wsuggest-attribute=cold" } */ > + > +extern void do_something_interesting_and_never_return (); > + > +int > +foo1(int a) > +{ /* { dg-warning "cold" "detect cold candidate" { target *-*-* } "8" } */ > + if (a) > + abort (); > + else > + abort (); > +} > + > +int > +foo2(int a) > +{ > + if (a) > + do_something_interesting_and_never_return (); > + abort (); > +} > Hi, this test-case failed for me due to: - excess errors due to missing abort declaration - warning emitted on line 7, but is expected on line 8 This patch that: - fixes the warning line number - rewrites the absolute warning line number into a relative one - adds the abort declaration Committed as obvious. Thanks, - Tom