* invoke.texi (Wsuggest-attribute=cold): Document.
[official-gcc.git] / gcc / testsuite / gcc.dg / cold-1.c
blob8ea88dd79a3f751713104dee35e4849138856492
1 /* { dg-do compile { target nonpic } } */
2 /* { dg-options "-O2 -Wsuggest-attribute=cold" } */
4 extern void do_something_interesting_and_never_return ();
6 int
7 foo1(int a)
8 { /* { dg-warning "cold" "detect cold candidate" { target *-*-* } "8" } */
9 if (a)
10 abort ();
11 else
12 abort ();
15 int
16 foo2(int a)
18 if (a)
19 do_something_interesting_and_never_return ();
20 abort ();