111
|
1 /* { dg-do compile } */
|
145
|
2 /* { dg-options "-O2 -fdump-tree-einline-optimized --param max-early-inliner-iterations=3" } */
|
111
|
3 /* { dg-add-options bind_pic_locally } */
|
|
4
|
|
5 namespace std {
|
|
6 extern "C" int puts(const char *s);
|
|
7 }
|
|
8
|
|
9 template <class T, class E> void
|
|
10 foreach (T b, T e, E ptr)
|
|
11 {
|
|
12 for (; b != e; b++)
|
|
13 ptr(*b);
|
|
14 }
|
|
15
|
|
16 void
|
|
17 inline_me (char *x)
|
|
18 {
|
|
19 std::puts(x);
|
|
20 }
|
|
21
|
|
22 static void
|
|
23 inline_me_too (char *x)
|
|
24 {
|
|
25 std::puts(x);
|
|
26 }
|
|
27
|
|
28 int main(int argc, char **argv)
|
|
29 {
|
|
30 foreach (argv, argv + argc, inline_me);
|
|
31 foreach (argv, argv + argc, inline_me_too);
|
|
32 }
|
|
33
|
|
34 /* { dg-final { scan-tree-dump-times "Inlining void inline_me\\(" 1 "einline"} } */
|
|
35 /* { dg-final { scan-tree-dump-times "Inlining void inline_me_too\\(" 1 "einline"} } */
|