Debian Codegraph @

gcc/testsuite/gcc.dg/cold-1.c

raw
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
8 foo1(int a)
9 { /* { dg-warning "cold" "detect cold candidate" { target *-*-* } ".-1" } */
10 if (a)
11 abort ();
12 else
13 abort ();
14 }
15
16 int
17 foo2(int a)
18 {
19 if (a)
20 do_something_interesting_and_never_return ();
21 abort ();
22 }