1 /* { dg-do compile { target nonpic } } */ 2 /* { dg-options "-O2 -Wsuggest-attribute=cold" } */ 3 4 extern void abort (void); 5 extern void do_something_interesting_and_never_return (); 6 7 int foo1(int a)8foo1(int a) 9 { /* { dg-warning "cold" "detect cold candidate" { target *-*-* } ".-1" } */ 10 if (a) 11 abort (); 12 else 13 abort (); 14 } 15 16 int foo2(int a)17foo2(int a) 18 { 19 if (a) 20 do_something_interesting_and_never_return (); 21 abort (); 22 } 23