1 /* { dg-do link } */
2 /* { dg-options "-O" } */
3 
4 /* When optimized we expect the call to foo () in bar to be inlined
5    and the call to link_error optimized away.  */
6 
7 extern void link_error (void);
foo(void)8 inline int __attribute__((always_inline)) foo(void) { return 0; }
9 
main()10 int main()
11 {
12   int (*fn)(void) = foo;
13   if (fn())
14     link_error ();
15   return 0;
16 }
17 
18