PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / cold-1.c
blobba1cd3a4e62ad4ccb591c3235e1303f947dbcd63
1 /* { dg-do compile { target nonpic } } */
2 /* { dg-options "-O2 -Wsuggest-attribute=cold" } */
4 extern void abort (void);
5 extern void do_something_interesting_and_never_return ();
7 int
8 foo1(int a)
9 { /* { dg-warning "cold" "detect cold candidate" { target *-*-* } ".-1" } */
10 if (a)
11 abort ();
12 else
13 abort ();
16 int
17 foo2(int a)
19 if (a)
20 do_something_interesting_and_never_return ();
21 abort ();