]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/lto/20091013-1_0.c
Silence warning in gcc.dg/lto/20091013-1_0.c
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / lto / 20091013-1_0.c
1 /* { dg-lto-do link } */
2 /* { dg-require-effective-target fpic } */
3 /* { dg-require-effective-target ptr_eq_long } */
4 /* { dg-lto-options {{-fPIC -r -nostdlib -flto} {-fPIC -r -nostdlib -O2 -flto}} } */
5 /* { dg-extra-ld-options "-flinker-output=nolto-rel -Wno-stringop-overread" } */
6
7 void * HeapAlloc(void*,unsigned int,unsigned long);
8
9 typedef struct tagGdiFont GdiFont;
10
11 typedef struct tagDC {
12 int xunused;
13 GdiFont *gdiFont;
14 unsigned int font_code_page;
15 } DC;
16
17 DC *alloc_dc_ptr( void *funcs, unsigned short magic )
18 {
19 DC *dc;
20 if (!(dc = HeapAlloc( 0, 0, sizeof(*dc) ))) return ((void *)0);
21 dc->gdiFont = 0;
22 return dc;
23 }
24