aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/lto/20091013-1_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/lto/20091013-1_0.c')
-rw-r--r--gcc/testsuite/gcc.dg/lto/20091013-1_0.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/lto/20091013-1_0.c b/gcc/testsuite/gcc.dg/lto/20091013-1_0.c
new file mode 100644
index 00000000000..e1a7dc86b6b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/20091013-1_0.c
@@ -0,0 +1,21 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-fPIC -shared -flto} {-fPIC -shared -O2 -flto}} } */
+
+void * HeapAlloc(void*,unsigned int,unsigned long);
+
+typedef struct tagGdiFont GdiFont;
+
+typedef struct tagDC {
+ int xunused;
+ GdiFont *gdiFont;
+ unsigned int font_code_page;
+} DC;
+
+DC *alloc_dc_ptr( void *funcs, unsigned short magic )
+{
+ DC *dc;
+ if (!(dc = HeapAlloc( 0, 0, sizeof(*dc) ))) return ((void *)0);
+ dc->gdiFont = 0;
+ return dc;
+}
+