summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/lto/20081201-2_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/lto/20081201-2_0.c')
-rw-r--r--gcc/testsuite/gcc.dg/lto/20081201-2_0.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/lto/20081201-2_0.c b/gcc/testsuite/gcc.dg/lto/20081201-2_0.c
new file mode 100644
index 000000000..fd021eb1c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/20081201-2_0.c
@@ -0,0 +1,16 @@
+/* { dg-lto-options {{-O3 -flto -flto-partition=1to1}} } */
+
+/* Test that cross-TU inlining works. */
+
+extern void abort ();
+extern void exit (int);
+extern void *foo (void);
+
+int
+main ()
+{
+ if (foo () != __builtin_return_address (0))
+ abort ();
+
+ exit (0);
+}