gcc/testsuite/g++.old-deja/g++.other/inline5.C
raw| 1 | // { dg-do assemble } |
| 2 | // { dg-options "-O2" } |
| 3 | // Origin: Matt Austern <[email protected]> |
| 4 | |
| 5 | class X; |
| 6 | |
| 7 | extern X* tab1; |
| 8 | |
| 9 | struct Y { |
| 10 | explicit Y(int); |
| 11 | }; |
| 12 | |
| 13 | void* x (); |
| 14 | |
| 15 | Y k (void *); |
| 16 | |
| 17 | inline void f() { k (x ()); } |
| 18 | |
| 19 | inline void* x () |
| 20 | { |
| 21 | return 0; |
| 22 | } |
| 23 | |
| 24 | static void g() { |
| 25 | f(); |
| 26 | } |
| 27 | |
| 28 | static void h() { |
| 29 | f(); |
| 30 | } |