OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-stable/gcc-4.5.1/gcc/testsuite/gcc.dg/lto
    from Rev 816 to Rev 826
    Reverse comparison

Rev 816 → Rev 826

/20091216-1_0.c
0,0 → 1,13
/* { dg-lto-do run } */
 
#ifdef __ia64
asm (".globl start_\nstart_: nop 0");
#else
asm (".globl start_; start_: nop");
#endif
 
int
main ()
{
return 0;
}
20091216-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090313_0.c =================================================================== --- 20090313_0.c (nonexistent) +++ 20090313_0.c (revision 826) @@ -0,0 +1,11 @@ +/* { dg-lto-options "-mcpu=v9" { target sparc*-*-* } } */ +/* { dg-require-effective-target sync_char_short } */ +void +_cairo_clip_path_reference () { + int a; + __sync_fetch_and_add(&a, 1); +} + +int main(void) { + return 0; +}
20090313_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091016-1_a.h =================================================================== --- 20091016-1_a.h (nonexistent) +++ 20091016-1_a.h (revision 826) @@ -0,0 +1,6 @@ +typedef union tree_node *tree; +union tree_node { + tree * use; + VEC_constructor_elt_gc *elts; +}; +
20091016-1_a.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091015-1_b.h =================================================================== --- 20091015-1_b.h (nonexistent) +++ 20091015-1_b.h (revision 826) @@ -0,0 +1,2 @@ +typedef struct _IO_FILE FILE; +extern struct _IO_FILE *stderr;
20091015-1_b.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081111_0.c =================================================================== --- 20081111_0.c (nonexistent) +++ 20081111_0.c (revision 826) @@ -0,0 +1,11 @@ +extern int mumble; +extern void abort (void); +extern void exit (int); + +int +main () +{ + if (++mumble != 42) + abort (); + exit (0); +}
20081111_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091014-1_0.c =================================================================== --- 20091014-1_0.c (nonexistent) +++ 20091014-1_0.c (revision 826) @@ -0,0 +1,4 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-fPIC -r -nostdlib -flto}} } */ + +/* Empty file. See PR41173. */
20091014-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091013-1_1.c =================================================================== --- 20091013-1_1.c (nonexistent) +++ 20091013-1_1.c (revision 826) @@ -0,0 +1,111 @@ +typedef struct HDC__ { int unused; } *HDC; +typedef struct HFONT__ { int unused; } *HFONT; + +typedef struct +{ + unsigned int ciACP; +} CHARSETINFO, *PCHARSETINFO, *LPCHARSETINFO; + +typedef struct tagTEXTMETRICW +{ + int tmCharSet; +} TEXTMETRICW, *LPTEXTMETRICW, *PTEXTMETRICW; + +struct gdi_obj_funcs +{ + void* (*pSelectObject)( void* handle, void* hdc ); +}; + +typedef struct tagGdiFont GdiFont; + +typedef struct tagDC +{ + int xunused; + GdiFont *gdiFont; + unsigned int font_code_page; +} DC; + +extern GdiFont* WineEngCreateFontInstance(DC*, HFONT); +extern unsigned int WineEngGetTextCharsetInfo(GdiFont *font, void* fs, unsigned int flags); +extern int WineEngGetTextMetrics(GdiFont*, LPTEXTMETRICW); +extern void* alloc_gdi_handle( void *obj, unsigned short type, const struct gdi_obj_funcs *funcs ); + +enum __wine_debug_class +{ + __WINE_DBCL_FIXME, + __WINE_DBCL_ERR, + __WINE_DBCL_WARN, + __WINE_DBCL_TRACE, + + __WINE_DBCL_INIT = 7 +}; + +struct __wine_debug_channel +{ + unsigned char flags; + char name[15]; +}; + +extern int wine_dbg_log( enum __wine_debug_class cls, struct __wine_debug_channel *ch, const char *func, + const char *format, ... ) __attribute__((format (printf,4,5))); + +static struct __wine_debug_channel __wine_dbch_font = { ~0, "font" }; +static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_font; + +static void* FONT_SelectObject( void* handle, void* hdc ); + +static const struct gdi_obj_funcs font_funcs = +{ + FONT_SelectObject, +}; + +HFONT CreateFontIndirectW( const void *plf ) +{ + return alloc_gdi_handle( 0, 6, &font_funcs ); +} + +static void update_font_code_page( DC *dc ) +{ + CHARSETINFO csi; + int charset = (unsigned char)1; + + if (dc->gdiFont) + charset = WineEngGetTextCharsetInfo( dc->gdiFont, ((void *)0), 0 ); + + if (TranslateCharsetInfo( ((void *)(unsigned long)((unsigned long)charset)), &csi, 1) ) + dc->font_code_page = csi.ciACP; + else { + switch(charset) { + case (unsigned char)1: + dc->font_code_page = GetACP(); + break; + + case (unsigned char)246: + dc->font_code_page = 0; + break; + + default: + do { if((((__wine_dbch___default))->flags & (1 << __WINE_DBCL_FIXME))) { struct __wine_debug_channel * const __dbch = (__wine_dbch___default); const enum __wine_debug_class __dbcl = __WINE_DBCL_FIXME; wine_dbg_log( __dbcl, __dbch, __FUNCTION__, "Can't find codepage for charset %d\n", charset); } } while(0); + dc->font_code_page = 0; + break; + } + } + + do { if((((__wine_dbch___default))->flags & (1 << __WINE_DBCL_TRACE))) { struct __wine_debug_channel * const __dbch = (__wine_dbch___default); const enum __wine_debug_class __dbcl = __WINE_DBCL_TRACE; wine_dbg_log( __dbcl, __dbch, __FUNCTION__, "charset %d => cp %d\n", charset, dc->font_code_page); } } while(0); +} + +static void* FONT_SelectObject( void* handle, void* hdc ) +{ + DC *dc; + + dc->gdiFont = WineEngCreateFontInstance( dc, handle ); + update_font_code_page( dc ); + return 0; +} + +int GetTextMetricsW( HDC hdc, TEXTMETRICW *metrics ) +{ + DC * dc; + return WineEngGetTextMetrics(dc->gdiFont, metrics); +} +
20091013-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081112_0.c =================================================================== --- 20081112_0.c (nonexistent) +++ 20081112_0.c (revision 826) @@ -0,0 +1,14 @@ +extern void exit (int); +extern void abort (void); + +extern void f (); +extern int g (); + +int +main () +{ + f (); + if (g () != 42) + abort (); + exit (0); +}
20081112_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091016-1_0.c =================================================================== --- 20091016-1_0.c (nonexistent) +++ 20091016-1_0.c (revision 826) @@ -0,0 +1,13 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-fPIC -r -nostdlib -O2 -flto}} } */ + +typedef struct VEC_constructor_elt_gc { } VEC_constructor_elt_gc; +#include "20091016-1_a.h" +struct stmt_tree_s { + tree x_cur_stmt_list; +}; +void *add_stmt (struct stmt_tree_s *x) +{ + return &x->x_cur_stmt_list; +} +
20091016-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091015-1_1.c =================================================================== --- 20091015-1_1.c (nonexistent) +++ 20091015-1_1.c (revision 826) @@ -0,0 +1,4 @@ +#include "20091015-1_a.h" +#include "20091015-1_b.h" +void ggc_print_common_statistics (FILE *stream) { +}
20091015-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090206-1_0.c =================================================================== --- 20090206-1_0.c (nonexistent) +++ 20090206-1_0.c (revision 826) @@ -0,0 +1,11 @@ +/* { dg-lto-do link } */ +/* { dg-skip-if "" { ! { i?86-*-linux* x86_64-*-linux* } } { "*" } { "" } } */ +/* { dg-lto-options {{-fPIC -r -nostdlib -fwhopr -msse2}} } */ +/* { dg-require-effective-target sse2 } */ +/* { dg-suppress-ld-options {-fPIC -msse2} } */ + +typedef short v8hi __attribute__((__vector_size__(16))); +void func (void) { + v8hi x, y, z; + z = __builtin_ia32_paddw128 (x, y); +}
20090206-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081115_0.c =================================================================== --- 20081115_0.c (nonexistent) +++ 20081115_0.c (revision 826) @@ -0,0 +1,32 @@ +/* { dg-lto-options {{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}} } */ + +extern void abort (void); + +int f (void) +{ + return 1; +} + +extern inline int +e_inline_baz (void) +{ + return 1 + f(); +} + +int +bar (void) +{ + return e_inline_baz (); +} + +main () +{ +#ifdef OPTIMIZE + if (bar () != 2 || foo () != 3) + abort (); +#else + if (bar () != 0 || foo () != 0) + abort (); +#endif + return 0; +}
20081115_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090206-2_0.c =================================================================== --- 20090206-2_0.c (nonexistent) +++ 20090206-2_0.c (revision 826) @@ -0,0 +1,18 @@ +/* { dg-lto-do link } */ +/* { dg-skip-if "" { ! { i?86-*-linux* x86_64-*-linux* } } { "*" } { "" } } */ +/* { dg-lto-options {{-fwhopr -fPIC}} } */ +/* { dg-suppress-ld-options {-fPIC} } */ + +void func(int n) { + static int __thread v = 0; + int i; + for (i = 0; i < n; ++i) { + volatile int *p = &v; + volatile int x __attribute__ ((unused)) = *p; + } +} + +int main(int argc, char **argv) { + func(argc); + return 0; +}
20090206-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091017-1_1.c =================================================================== --- 20091017-1_1.c (nonexistent) +++ 20091017-1_1.c (revision 826) @@ -0,0 +1,6 @@ +struct X; +void foo (void *q) +{ + struct X **p = (struct X **)q; + *p = (struct X *)0; +}
20091017-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081115_2.c =================================================================== --- 20081115_2.c (nonexistent) +++ 20081115_2.c (revision 826) @@ -0,0 +1,5 @@ +int +e_inline_baz (void) +{ + return 0; +}
20081115_2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081118_0.c =================================================================== --- 20081118_0.c (nonexistent) +++ 20081118_0.c (revision 826) @@ -0,0 +1,28 @@ +/* { dg-lto-options {{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}} } */ + +extern void abort (void); +extern int f (void); + +extern inline int +e_inline_baz (void) +{ + return 1 + f(); +} + +int +bar (void) +{ + return e_inline_baz (); +} + +main () +{ +#ifdef OPTIMIZE + if (bar () != 2 || foo () != 3) + abort (); +#else + if (bar () != 0 || foo () != 0) + abort (); +#endif + return 0; +}
20081118_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090706-1_0.c =================================================================== --- 20090706-1_0.c (nonexistent) +++ 20090706-1_0.c (revision 826) @@ -0,0 +1,42 @@ +#include + +extern void abort (void); + +void foo (int size, ...) +{ + struct + { + struct + { + char x[size]; + } e; + unsigned r; + } d; + va_list ap; + char c; + int i; + + va_start (ap, size); + d = va_arg (ap, typeof (d)); + c = d.e.x[3]; + if (c != '3') + abort (); + if (d.r != 2602) + abort (); + va_end (ap); +} + +int main (void) +{ + int z = 5, i; + struct { struct { char a[z]; } y; unsigned r; } x; + + x.y.a[0] = '0'; + x.y.a[1] = '1'; + x.y.a[2] = '2'; + x.y.a[3] = '3'; + x.y.a[4] = '4'; + x.r = 2602; + foo (z, x); + return 0; +}
20090706-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081118_2.c =================================================================== --- 20081118_2.c (nonexistent) +++ 20081118_2.c (revision 826) @@ -0,0 +1,11 @@ +int +e_inline_baz (void) +{ + return 0; +} + + __attribute__((noinline)) int +f (void) +{ + return 1; +}
20081118_2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090706-2_0.c =================================================================== --- 20090706-2_0.c (nonexistent) +++ 20090706-2_0.c (revision 826) @@ -0,0 +1,16 @@ +extern void abort (void); + +int foo (int size) +{ + int a[size]; + a[size - 10] = 42; + return a[size - 10] + size; +} + +main() +{ + int x = foo (20); + if (x != 62) + abort (); + return 0; +}
20090706-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20080908_0.c =================================================================== --- 20080908_0.c (nonexistent) +++ 20080908_0.c (revision 826) @@ -0,0 +1,16 @@ +/* { dg-lto-do assemble } */ +void foo(void) { + char *bar; + int baz; + while (1) + { + if (baz) + { + baz = -baz; + do + *bar++ = 0; + while (++baz); + } + ++baz; + } +}
20080908_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090729_1.c =================================================================== --- 20090729_1.c (nonexistent) +++ 20090729_1.c (revision 826) @@ -0,0 +1,4 @@ +double j; +int i; +int main () { return i; } +
20090729_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20100104_0.c =================================================================== --- 20100104_0.c (nonexistent) +++ 20100104_0.c (revision 826) @@ -0,0 +1,8 @@ +/* { dg-lto-do assemble } */ +/* The problem with this testcase is that we were missing an undefined + reference to c_common_attribute_table. This can be tested with + GNUTARGET=plugin nm --plugin liblto_plugin.so 20100104_0.o + but we don't have support in the testsuite for doing it. */ + +extern int c_common_attribute_table[]; +void *foobar = c_common_attribute_table;
20100104_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20100423-1_0.c =================================================================== --- 20100423-1_0.c (nonexistent) +++ 20100423-1_0.c (revision 826) @@ -0,0 +1,11 @@ +/* { dg-lto-do run } */ +/* { dg-lto-options {{-O2 -flto}} } */ + +struct bar {int x;}; +extern struct bar foo(void); +int main() +{ + struct bar x=foo(); + return 0; +} +
20100423-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081120-1_0.c =================================================================== --- 20081120-1_0.c (nonexistent) +++ 20081120-1_0.c (revision 826) @@ -0,0 +1,5 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-flto -r -nostdlib}} } */ +extern int stat(void) __asm__("" "stat64"); +extern inline int stat(void) { } +static void foo(void) { stat(); }
20081120-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081201-1_0.c =================================================================== --- 20081201-1_0.c (nonexistent) +++ 20081201-1_0.c (revision 826) @@ -0,0 +1,33 @@ +/* { dg-lto-options {{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}} } */ + +extern void abort (void); + +int +f (void) +{ + return 1; +} + +extern inline int +e_inline_baz (void) +{ + return 1 + f(); +} + +int +bar (void) +{ + return e_inline_baz (); +} + +main () +{ +#ifdef OPTIMIZE + if (bar () != 2 || foo () != 3) + abort (); +#else + if (bar () != 0 || foo () != 0) + abort (); +#endif + return 0; +}
20081201-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20100108_0.c =================================================================== --- 20100108_0.c (nonexistent) +++ 20100108_0.c (revision 826) @@ -0,0 +1,9 @@ +/* { dg-lto-do assemble } */ +/* The problem with this testcase is that we were missing an undefined + reference to flag_exceptions. This can be tested with + GNUTARGET=plugin nm --plugin liblto_plugin.so 20100108_0.o + but we don't have support in the testsuite for doing it. */ + +extern int flag_exceptions; +static int *foo = &flag_exceptions; +int **bar = &foo;
20100108_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20100227-1_0.c =================================================================== --- 20100227-1_0.c (nonexistent) +++ 20100227-1_0.c (revision 826) @@ -0,0 +1,14 @@ +/* { dg-lto-do link } */ +/* { dg-extra-ld-options "-w" } */ + +/* Make sure we do not ICE on the invalid re-declaration of s. */ + +extern void f(void); +const char *s = "Hello, world!"; + +int main(void) +{ + f(); + return 0; +} +
20100227-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081120-2_0.c =================================================================== --- 20081120-2_0.c (nonexistent) +++ 20081120-2_0.c (revision 826) @@ -0,0 +1,3 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-fwhopr -r -nostdlib}} } */ +void bar(void) {}
20081120-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081201-2_0.c =================================================================== --- 20081201-2_0.c (nonexistent) +++ 20081201-2_0.c (revision 826) @@ -0,0 +1,16 @@ +/* { dg-lto-options {{-O3 -fwhopr}} } */ + +/* 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); +}
20081201-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091020-1_1.c =================================================================== --- 20091020-1_1.c (nonexistent) +++ 20091020-1_1.c (revision 826) @@ -0,0 +1,15 @@ +typedef struct { + int NumPackStreams; +} CSzAr; +typedef struct { + CSzAr db; +} CSzArEx; +int SzArEx_Init(CSzArEx *p) +{ + return p->db.NumPackStreams; +} +int SzArEx_GetFolderFullPackSize(const CSzArEx *p) +{ + return p->db.NumPackStreams; +} +
20091020-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081201-1_2.c =================================================================== --- 20081201-1_2.c (nonexistent) +++ 20081201-1_2.c (revision 826) @@ -0,0 +1,7 @@ +int +e_inline_baz (void) +{ + return 0; +} + +
20081201-1_2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081202-1_1.c =================================================================== --- 20081202-1_1.c (nonexistent) +++ 20081202-1_1.c (revision 826) @@ -0,0 +1,10 @@ +static void __attribute__((noinline)) +bar (void) +{ +} + +void +foo (void) +{ + bar (); +}
20081202-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091020-2_1.c =================================================================== --- 20091020-2_1.c (nonexistent) +++ 20091020-2_1.c (revision 826) @@ -0,0 +1,5 @@ +typedef struct { + int NumPackStreams; +} CSzAr; +void cli_7unz (CSzAr db) { } +
20091020-2_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20100426_0.c =================================================================== --- 20100426_0.c (nonexistent) +++ 20100426_0.c (revision 826) @@ -0,0 +1,7 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-r -nostdlib -flto -g}} } */ + +long Perl_my_htonl (long l) +{ + union { } u; +}
20100426_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081202-2_1.c =================================================================== --- 20081202-2_1.c (nonexistent) +++ 20081202-2_1.c (revision 826) @@ -0,0 +1,16 @@ +static void __attribute__((noinline)) +bar (void) +{ +} + +void * +foo (void) +{ + return bar; +} + +void +quxx (void) +{ + return bar (); +}
20081202-2_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090210_1.c =================================================================== --- 20090210_1.c (nonexistent) +++ 20090210_1.c (revision 826) @@ -0,0 +1,22 @@ +/* { dg-options "-fPIC" } */ +static void +f (int n) +{ + int i; + static int __thread value = 100; + for (i = 0; i < n; ++i) + { + volatile int *p = &value; + volatile int x __attribute__ ((unused)) = *p; + } +} + + +extern int foo (int); + +int +main (int argc, char **argv) +{ + f (foo (4) + argc); + return 0; +}
20090210_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091006-1_0.c =================================================================== --- 20091006-1_0.c (nonexistent) +++ 20091006-1_0.c (revision 826) @@ -0,0 +1,14 @@ +/* { dg-lto-do link } */ + +typedef void (*fnt) (void); +void __attribute__((noinline)) bar (void) {} +extern inline void check3 (void) +{ + bar (); +} +void test (void) +{ + const fnt pcheck3 = check3; + pcheck3 (); +} +int main() { return 0; }
20091006-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091005-1_1.c =================================================================== --- 20091005-1_1.c (nonexistent) +++ 20091005-1_1.c (revision 826) @@ -0,0 +1,2 @@ +extern int i[10]; +int main () { return i[0]; }
20091005-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081204-1_1.c =================================================================== --- 20081204-1_1.c (nonexistent) +++ 20081204-1_1.c (revision 826) @@ -0,0 +1,5 @@ +extern const int i[]; + +int dummy(void) { + return i[0]; +}
20081204-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091006-2_0.c =================================================================== --- 20091006-2_0.c (nonexistent) +++ 20091006-2_0.c (revision 826) @@ -0,0 +1,4 @@ +/* { dg-lto-do link } */ + +extern int a[10]; +int main() { return 0; }
20091006-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090312_0.c =================================================================== --- 20090312_0.c (nonexistent) +++ 20090312_0.c (revision 826) @@ -0,0 +1,43 @@ +/* { dg-lto-do link } */ +extern int **foo (void); +extern void mumble (char*, char*, char*); + +static int * +bar (char **sp) +{ + char *s = *sp, *rs = s; + int c; + while (*foo ()[c]) + rs++; + while (c = *rs) + { + if (c || ((c == '"') || (c == '\''))) + { + if (c) + *rs++ = c; + else + mumble (0, "", ""); + } + else if (c || (*foo ()[c] & 1)) + *rs++ = c; + } + if (c) + mumble (0, "", ""); +} + +static void +baz (char *s) +{ + char *args[100]; + while (bar (&s)) + { + mumble (args[0], "", ""); + } +} + +int +main (void) +{ + baz (""); + return 0; +}
20090312_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081222_1.c =================================================================== --- 20081222_1.c (nonexistent) +++ 20081222_1.c (revision 826) @@ -0,0 +1,16 @@ +#include "20081222_0.h" + +/* Actually, call "x" "INT_X", and make it hidden. */ +extern __typeof (x) x + __asm__ ("INT_x") + __attribute__ ((__visibility__ ("hidden"))); + +int x () +{ + return 7; +} + +/* Make an externally-visible symbol "X" that's an alias for INT_x. */ +extern __typeof (x) EXT_x + __asm__ ("x") + __attribute__ ((__alias__ ("INT_x")));
20081222_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090213_1.c =================================================================== --- 20090213_1.c (nonexistent) +++ 20090213_1.c (revision 826) @@ -0,0 +1,6 @@ +int foo (int x) +{ + return x * 32; +} + +
20090213_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091027-1_0.c =================================================================== --- 20091027-1_0.c (nonexistent) +++ 20091027-1_0.c (revision 826) @@ -0,0 +1,11 @@ +/* { dg-lto-do link } */ +/* { dg-extra-ld-options "-r -nostdlib" } */ + +typedef struct _xmlDict xmlDict; +struct _xmlDict { + int ref_counter; +}; +void xmlDictCreate(void) { + xmlDict * dict; +} +
20091027-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091006-2_2.c =================================================================== --- 20091006-2_2.c (nonexistent) +++ 20091006-2_2.c (revision 826) @@ -0,0 +1 @@ +extern int a[14];
20091006-2_2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081125_0.c =================================================================== --- 20081125_0.c (nonexistent) +++ 20081125_0.c (revision 826) @@ -0,0 +1,6 @@ +int foo (int); + +int main() +{ + return foo (0); +}
20081125_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090116_0.c =================================================================== --- 20090116_0.c (nonexistent) +++ 20090116_0.c (revision 826) @@ -0,0 +1,12 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-O1 -fwhopr -fPIC}} } */ +/* { dg-extra-ld-options {-r -nostdlib -O0} } */ + +int foo(void) { + int ret, i; + for (i = 0; i < 1; i++) + ret = 0; + for (i = 0; i < 1; i++) + ret = 1; + return ret; +}
20090116_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081126_0.c =================================================================== --- 20081126_0.c (nonexistent) +++ 20081126_0.c (revision 826) @@ -0,0 +1,8 @@ +/* { dg-lto-do link } */ +/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */ +/* { dg-lto-options {{-flto -r -nostdlib}} } */ + +int f(void) { + register int ri asm("edi"); + return ri; +}
20081126_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081224_1.c =================================================================== --- 20081224_1.c (nonexistent) +++ 20081224_1.c (revision 826) @@ -0,0 +1,2 @@ +#include "20081224_0.h" +foo_t x;
20081224_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090218-1_1.c =================================================================== --- 20090218-1_1.c (nonexistent) +++ 20090218-1_1.c (revision 826) @@ -0,0 +1,9 @@ +int main(void) +{ + return 0; +} +static void __attribute__ ((noinline)) get_mem_attrs () { +} +void __attribute__ ((always_inline)) set_mem_alias_set () { + get_mem_attrs (); +}
20090218-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090218-2_1.c =================================================================== --- 20090218-2_1.c (nonexistent) +++ 20090218-2_1.c (revision 826) @@ -0,0 +1,19 @@ +typedef struct { +} mem_attrs; +int main(void) +{ + return 0; +} +void *malloc(unsigned long size); +void *memcpy(void *dest, const void *src, unsigned long n); +static mem_attrs * get_mem_attrs () { + void **slot; + *slot = malloc (3); + memcpy (*slot, 0, 3); +} +void set_mem_attributes () { + get_mem_attrs (); +} +void set_mem_alias_set () { + get_mem_attrs (); +}
20090218-2_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090812_1.c =================================================================== --- 20090812_1.c (nonexistent) +++ 20090812_1.c (revision 826) @@ -0,0 +1,26 @@ +/* struct X is complete in this TU, this causes us to not merge Y and + thus assign different alias-sets to them. */ +struct X +{ + int i; +}; +struct Y +{ + struct X *p; + int i; +}; +extern void abort (void); +extern void foo(struct Y *); +int __attribute__((noinline)) bar(struct Y *p) +{ + p->i = 0; + foo (p); + return p->i; +} +int main() +{ + struct Y y; + if (bar (&y) != 1) + abort (); + return 0; +}
20090812_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090218_1.c =================================================================== --- 20090218_1.c (nonexistent) +++ 20090218_1.c (revision 826) @@ -0,0 +1,6 @@ +void bar(void); +void __attribute__((noinline)) *foo1 (void) +{ + bar(); + return (void *) bar; +}
20090218_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090218_3.c =================================================================== --- 20090218_3.c (nonexistent) +++ 20090218_3.c (revision 826) @@ -0,0 +1,3 @@ +void bar(void) +{ +}
20090218_3.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090717_0.c =================================================================== --- 20090717_0.c (nonexistent) +++ 20090717_0.c (revision 826) @@ -0,0 +1,4 @@ +struct variable { + const char *string; +}; +struct variable table[] = { };
20090717_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20080917_0.c =================================================================== --- 20080917_0.c (nonexistent) +++ 20080917_0.c (revision 826) @@ -0,0 +1,29 @@ +/* { dg-lto-do assemble } */ +/* { dg-lto-options {{-O2 -funsigned-char}} } */ +int +foo (char *s, int flag) +{ + for (;;) + { + unsigned char c; + if (flag) + c = *s; + else + c = *s; + return c; + } +} + +int +baz (const char *s, int flag) +{ + for (;;) + { + unsigned char c; + if (flag) + c = *s; + else + c = *s; + return c; + } +}
20080917_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091015-1_a.h =================================================================== --- 20091015-1_a.h (nonexistent) +++ 20091015-1_a.h (revision 826) @@ -0,0 +1,2 @@ +struct _IO_FILE { int _flags; +};
20091015-1_a.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20100430-1_0.c =================================================================== --- 20100430-1_0.c (nonexistent) +++ 20100430-1_0.c (revision 826) @@ -0,0 +1,14 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-O2 -fprofile-arcs -flto -r -nostdlib}} } */ + +void +expand_stmt_with_iterators_1 (void) +{ + extern void expand_expr_stmt (void); + expand_expr_stmt (); +} +void +iterator_expand (void) +{ + expand_stmt_with_iterators_1 (); +}
20100430-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: lto.exp =================================================================== --- lto.exp (nonexistent) +++ lto.exp (revision 826) @@ -0,0 +1,59 @@ +# Copyright (C) 2009 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . +# +# Contributed by Diego Novillo + + +# Test link-time optimization across multiple files. +# +# Programs are broken into multiple files. Each one is compiled +# separately with LTO information. The final executable is generated +# by collecting all the generated object files using regular LTO or WHOPR. + +if $tracelevel then { + strace $tracelevel +} + +# Load procedures from common libraries. +load_lib standard.exp +load_lib gcc.exp + +# Load the language-independent compabibility support procedures. +load_lib lto.exp + +# If LTO has not been enabled, bail. +if { ![check_effective_target_lto] } { + return +} + +gcc_init +lto_init no-mathlib + +# Define an identifier for use with this suite to avoid name conflicts +# with other lto tests running at the same time. +set sid "c_lto" + +# Main loop. +foreach src [lsort [find $srcdir/$subdir *_0.c]] { + # If we're only testing specific files and this isn't one of them, skip it. + if ![runtest_file_p $runtests $src] then { + continue + } + + lto-execute $src $sid +} + +lto_finish Index: 20081210-1_0.c =================================================================== --- 20081210-1_0.c (nonexistent) +++ 20081210-1_0.c (revision 826) @@ -0,0 +1,23 @@ +#if defined(_LP64) +typedef unsigned long int uintptr_t; +#elif defined (_WIN64) +typedef unsigned long long int uintptr_t; +#else +typedef unsigned int uintptr_t; +#endif + +extern void srand (uintptr_t); + +inline void +foo (uintptr_t seed) +{ + srand (seed * seed); +} + +int +main () +{ + foo (0); + srand ((uintptr_t) (&foo)); + return 0; +}
20081210-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091013-1_0.c =================================================================== --- 20091013-1_0.c (nonexistent) +++ 20091013-1_0.c (revision 826) @@ -0,0 +1,21 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-fPIC -r -nostdlib -flto} {-fPIC -r -nostdlib -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; +} +
20091013-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081212-1_0.c =================================================================== --- 20081212-1_0.c (nonexistent) +++ 20081212-1_0.c (revision 826) @@ -0,0 +1,4 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-r -nostdlib}} } */ +int exported_var = 42; +/* { dg-final { scan-symbol "exported_var" } } */
20081212-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090120_0.c =================================================================== --- 20090120_0.c (nonexistent) +++ 20090120_0.c (revision 826) @@ -0,0 +1,14 @@ +/* { dg-lto-options {{-flto -funsigned-char}} } */ + +extern void abort (); + +char c = 0xff; + +int +main () +{ + int i = (unsigned) c; + if (i < 0) + abort (); + return 0; +}
20090120_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081111_1.c =================================================================== --- 20081111_1.c (nonexistent) +++ 20081111_1.c (revision 826) @@ -0,0 +1,7 @@ +int mumble = 41; + +int +bar (void) +{ + return mumble; +}
20081111_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081112_1.c =================================================================== --- 20081112_1.c (nonexistent) +++ 20081112_1.c (revision 826) @@ -0,0 +1,13 @@ +static int mumble; + +void +f (void) +{ + mumble = 41; +} + +int __attribute__((noinline)) +g (void) +{ + return ++mumble; +}
20081112_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091013-1_2.c =================================================================== --- 20091013-1_2.c (nonexistent) +++ 20091013-1_2.c (revision 826) @@ -0,0 +1,220 @@ +typedef struct HDC__ { int unused; } *HDC; +typedef struct HFONT__ { int unused; } *HFONT; + +void* HeapAlloc(void*,unsigned int,unsigned long); + +typedef struct tagLOGFONTW +{ + int lfPitchAndFamily; + unsigned short lfFaceName[32]; +} LOGFONTW, *PLOGFONTW, *LPLOGFONTW; + +typedef struct tagGdiFont GdiFont; +typedef struct tagDC DC; + +extern unsigned int WineEngGetFontData(GdiFont*, unsigned int, unsigned int, void*, unsigned int); + +struct list +{ + struct list *next; + struct list *prev; +}; + +typedef struct FT_FaceRec_ +{ + signed long face_flags; +} FT_FaceRec, *FT_Face; + +typedef struct { } GM; + +typedef struct { } FMAT2; + +typedef struct { + unsigned int hash; + LOGFONTW lf; + int can_use_bitmap; +} FONT_DESC; + + + +typedef struct tagHFONTLIST { + struct list entry; + HFONT hfont; +} HFONTLIST; + +typedef struct { + struct list entry; + void *face; + GdiFont *font; +} CHILD_FONT; + + +struct tagGdiFont { + struct list entry; + GM **gm; + struct list hfontlist; + struct list child_fonts; + + FT_Face ft_face; + FONT_DESC font_desc; + long ppem; +}; + + + +static struct list gdi_font_list = { &(gdi_font_list), &(gdi_font_list) }; + + + + +static int get_glyph_index_linked(GdiFont *font, unsigned int c, GdiFont **linked_font, unsigned int *glyph); +static long load_VDMX(GdiFont*, long); + +extern int f1(void*,int); + +static FT_Face OpenFontFace(GdiFont *font, void *face, long width, long height) +{ + FT_Face ft_face; + + font->ppem = load_VDMX(font, height); + if(font->ppem == 0) + font->ppem = f1(ft_face, height); + return ft_face; +} + + +static GdiFont *alloc_font(void) +{ + GdiFont *ret = HeapAlloc(0, 0x00000008, sizeof(*ret)); + ret->gm = HeapAlloc(0, 0x00000008, sizeof(GM*)); + return ret; +} + + +static long load_VDMX(GdiFont *font,long height) +{ + unsigned short hdr[3]; + + WineEngGetFontData(font, 0x42424242, 0, hdr, 6); + return 0; +} + +static int fontcmp(const GdiFont *font, FONT_DESC *fd) +{ + if(font->font_desc.hash != fd->hash) return 1; + if(memcmp(&font->font_desc.lf, &fd->lf, __builtin_offsetof (LOGFONTW, lfFaceName))) return 1; + if(!font->font_desc.can_use_bitmap != !fd->can_use_bitmap) return 1; + return strcmpiW(font->font_desc.lf.lfFaceName, fd->lf.lfFaceName); +} + +static GdiFont *find_in_cache(HFONT hfont, const LOGFONTW *plf, const FMAT2 *pmat, int can_use_bitmap) +{ + GdiFont *ret; + FONT_DESC fd; + HFONTLIST *hflist; + struct list *font_elem_ptr, *hfontlist_elem_ptr; + + fd.lf = *plf; + fd.can_use_bitmap = can_use_bitmap; + + + for ((font_elem_ptr) = (&gdi_font_list)->next; (font_elem_ptr) != (&gdi_font_list); (font_elem_ptr) = (font_elem_ptr)->next) { + ret = ((struct tagGdiFont *)((char *)(font_elem_ptr) - (unsigned long)(&((struct tagGdiFont *)0)->entry))); + if(!fontcmp(ret, &fd)) { + if(!can_use_bitmap && !( ret->ft_face->face_flags & ( 1L << 0 ) )) continue; + for ((hfontlist_elem_ptr) = (&ret->hfontlist)->next; (hfontlist_elem_ptr) != (&ret->hfontlist); (hfontlist_elem_ptr) = (hfontlist_elem_ptr)->next) { + hflist = ((struct tagHFONTLIST *)((char *)(hfontlist_elem_ptr) - (unsigned long)(&((struct tagHFONTLIST *)0)->entry))); + if(hflist->hfont == hfont) + return ret; + } + hflist = HeapAlloc(0, 0, sizeof(*hflist)); + hflist->hfont = hfont; + return ret; + } + } + + while(font_elem_ptr) { + ret = ((struct tagGdiFont *)((char *)(font_elem_ptr) - (unsigned long)(&((struct tagGdiFont *)0)->entry))); + if(!fontcmp(ret, &fd)) { + if(!can_use_bitmap && !( ret->ft_face->face_flags & ( 1L << 0 ) )) continue; + hflist = HeapAlloc(0, 0, sizeof(*hflist)); + hflist->hfont = hfont; + return ret; + } + } + return ((void *)0); +} + + + + +GdiFont *WineEngCreateFontInstance(DC *dc, HFONT hfont) +{ + GdiFont *ret; + int can_use_bitmap; + LOGFONTW lf; + FMAT2 dcmat; + + if((ret = find_in_cache(hfont, &lf, &dcmat, can_use_bitmap)) != ((void *)0)) + return ret; + return alloc_font(); +} + +extern unsigned int f(void*,unsigned int g); + +static unsigned int get_glyph_index(void*font, unsigned int glyph) +{ + return f(font, glyph); +} + +unsigned int WineEngGetGlyphOutline(GdiFont *incoming_font, unsigned int glyph, unsigned int format, + void* lpgm, unsigned int buflen, void* buf, + const void* lpmat) +{ + unsigned int glyph_index; + + get_glyph_index_linked(incoming_font, glyph, &incoming_font, &glyph_index); + return 0; +} + +static int load_child_font(GdiFont *font, CHILD_FONT *child) +{ + child->font = alloc_font(); + child->font->ft_face = OpenFontFace(child->font, child->face, 0, -font->ppem); + if(!child->font->ft_face) + return 0; + return 1; +} + +static int get_glyph_index_linked(GdiFont *font, unsigned int c, GdiFont **linked_font, unsigned int *glyph) +{ + unsigned int g; + CHILD_FONT *child_font; + + for ((child_font) = ((CHILD_FONT *)((char *)((&font->child_fonts)->next) - (unsigned long)(&((CHILD_FONT *)0)->entry))); &(child_font)->entry != (&font->child_fonts); (child_font) = ((CHILD_FONT *)((char *)((child_font)->entry.next) - (unsigned long)(&((CHILD_FONT *)0)->entry)))) + { + if(!load_child_font(font, child_font)) + continue; + + g = get_glyph_index(child_font->font, c); + if(g) { + *glyph = g; + *linked_font = child_font->font; + return 1; + } + } + return 0; +} + +unsigned int WineEngGetFontData(GdiFont *font, unsigned int table, unsigned int offset, void* buf, + unsigned int cbData) +{ + unsigned long len; + load_sfnt_table(font->ft_face, table, offset, buf, &len); + return len; +} + +int WineEngGetLinkedHFont(DC *dc, unsigned short c, HFONT *new_hfont, unsigned int *glyph) { + return get_glyph_index_linked(0, 0, 0, 0); +} +
20091013-1_2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091015-1_0.c =================================================================== --- 20091015-1_0.c (nonexistent) +++ 20091015-1_0.c (revision 826) @@ -0,0 +1,5 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-fPIC -r -nostdlib -O2 -flto} {-fPIC -r -nostdlib -O2 -fwhopr}} } */ + +#include "20091015-1_b.h" +void diagnostic_initialize (FILE **stream) { *stream = stderr; }
20091015-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20100518_0.c =================================================================== --- 20100518_0.c (nonexistent) +++ 20100518_0.c (revision 826) @@ -0,0 +1,14 @@ +/* { dg-lto-do link } */ +/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */ +/* Forgot to steam in/out the number of labels for asm goto. PR44184. */ + +extern int printf (__const char *__restrict __format, ...); + +int x = 1; +int main () +{ + asm goto ("decl %0; jnz %l[a]" :: "m"(x) : "memory" : a); + printf ("Hello world\n"); +a: + return 0; +}
20100518_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090126-1_0.c =================================================================== --- 20090126-1_0.c (nonexistent) +++ 20090126-1_0.c (revision 826) @@ -0,0 +1,7 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-O0 -fwhopr}} } */ +/* { dg-extra-ld-options {-r -nostdlib -O2 -fwhopr} } */ + +int main(int argc, char **argv) { + return 0; +}
20090126-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091015-1_2.c =================================================================== --- 20091015-1_2.c (nonexistent) +++ 20091015-1_2.c (revision 826) @@ -0,0 +1,5 @@ +#include "20091015-1_a.h" +#include "20091015-1_b.h" +void debug_optab_libfuncs (void) { +foo (stderr, 4 ); +}
20091015-1_2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091016-1_1.c =================================================================== --- 20091016-1_1.c (nonexistent) +++ 20091016-1_1.c (revision 826) @@ -0,0 +1,18 @@ +typedef struct VEC_constructor_elt_gcx { } VEC_constructor_elt_gc; +#include "20091016-1_a.h" +struct gcc_target { + void (* builtin_vec_perm) (tree*); +}; +extern struct gcc_target targetm; +void dwarf2out_begin_prologue (tree t) +{ + (*targetm.builtin_vec_perm) (&t); +} +struct die_arg_entry_struct { + tree arg; +}; +void *gt_pch_p_20VEC_die_arg_entry_gc (struct die_arg_entry_struct *vec) +{ + return &(vec->arg); +} +
20091016-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091017-1_0.c =================================================================== --- 20091017-1_0.c (nonexistent) +++ 20091017-1_0.c (revision 826) @@ -0,0 +1,15 @@ +/* { dg-lto-do run } */ + +struct X { + int i; +}; +extern void foo (void *); +extern void abort (void); +int main () +{ + struct X *p; + foo(&p); + if (p != (struct X *)0) + abort (); + return 0; +}
20091017-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090126-2_0.c =================================================================== --- 20090126-2_0.c (nonexistent) +++ 20090126-2_0.c (revision 826) @@ -0,0 +1,7 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-fPIC -O2 -fwhopr}} } */ +/* { dg-extra-ld-options {-fno-PIC -r -nostdlib -O2 -fwhopr} } */ + +int main(int argc, char **argv) { + return 0; +}
20090126-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081115_1.c =================================================================== --- 20081115_1.c (nonexistent) +++ 20081115_1.c (revision 826) @@ -0,0 +1,11 @@ +extern inline int +e_inline_baz (void) +{ + return 2 + 1; +} + +int +foo (void) +{ + return e_inline_baz (); +}
20081115_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081118_1.c =================================================================== --- 20081118_1.c (nonexistent) +++ 20081118_1.c (revision 826) @@ -0,0 +1,13 @@ +extern int f (void); + +extern inline int +e_inline_baz (void) +{ + return 2 + f (); +} + +int +foo (void) +{ + return e_inline_baz (); +}
20081118_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20080924_0.c =================================================================== --- 20080924_0.c (nonexistent) +++ 20080924_0.c (revision 826) @@ -0,0 +1,9 @@ +/* { dg-lto-do assemble } */ +/* { dg-lto-options {{-O2 -flto -funsigned-char}} } */ +typedef unsigned int size_t; +foo (const char *src, unsigned char *dst, size_t size) +{ + int ch; + while ((ch = *src++) != '\0') { + } +}
20080924_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090729_0.c =================================================================== --- 20090729_0.c (nonexistent) +++ 20090729_0.c (revision 826) @@ -0,0 +1,4 @@ +/* { dg-lto-options "-w" } */ + +double i; +int j;
20090729_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20100103-1_0.c =================================================================== --- 20100103-1_0.c (nonexistent) +++ 20100103-1_0.c (revision 826) @@ -0,0 +1,8 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-funsigned-char -flto} {-fsigned-char -flto}} } */ + +char *foo; +int main() +{ + foo = "bar"; +}
20100103-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20100103-2_0.c =================================================================== --- 20100103-2_0.c (nonexistent) +++ 20100103-2_0.c (revision 826) @@ -0,0 +1,12 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-O -flto -funsigned-char} {-O -flto -fsigned-char}} } */ + +char p[32] = ""; +int main () +{ + if (__builtin___strcpy_chk (p + 1, "vwxyz", + __builtin_object_size (p + 1, 0)) != p + 1) + __builtin_abort (); + return 0; +} +
20100103-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20100423-1_1.c =================================================================== --- 20100423-1_1.c (nonexistent) +++ 20100423-1_1.c (revision 826) @@ -0,0 +1,7 @@ +typedef struct{int x;} bar; +bar foo (void) +{ + bar x; + return x; +} +
20100423-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091020-1_0.c =================================================================== --- 20091020-1_0.c (nonexistent) +++ 20091020-1_0.c (revision 826) @@ -0,0 +1,8 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-fPIC -r -nostdlib -flto}} } */ + +typedef struct { + int NumPackStreams; +} CSzAr; +void cli_7unz (CSzAr db) { } +
20091020-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081120-1_1.c =================================================================== --- 20081120-1_1.c (nonexistent) +++ 20081120-1_1.c (revision 826) @@ -0,0 +1,3 @@ +extern int stat(void) __asm__("" "stat64"); +extern inline int stat(void) { } +static void foo(void) { stat(); }
20081120-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081201-1_1.c =================================================================== --- 20081201-1_1.c (nonexistent) +++ 20081201-1_1.c (revision 826) @@ -0,0 +1,13 @@ +extern int f (void); + +extern inline int +e_inline_baz (void) +{ + return 2 + f (); +} + +int +foo (void) +{ + return e_inline_baz (); +}
20081201-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081202-1_0.c =================================================================== --- 20081202-1_0.c (nonexistent) +++ 20081202-1_0.c (revision 826) @@ -0,0 +1,11 @@ +/* { dg-lto-options {{-fwhopr -O3}} } */ + +extern void exit (int); +extern void foo (void); + +int +main () +{ + foo (); + exit (0); +}
20081202-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091020-2_0.c =================================================================== --- 20091020-2_0.c (nonexistent) +++ 20091020-2_0.c (revision 826) @@ -0,0 +1,18 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-fPIC -r -nostdlib -flto}} } */ + +typedef struct { + int NumPackStreams; +} CSzAr; +typedef struct { + CSzAr db; +} CSzArEx; +int SzArEx_Init(CSzArEx *p) +{ + return p->db.NumPackStreams; +} +int SzArEx_GetFolderFullPackSize(const CSzArEx *p) +{ + return p->db.NumPackStreams; +} +
20091020-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20100227-1_1.c =================================================================== --- 20100227-1_1.c (nonexistent) +++ 20100227-1_1.c (revision 826) @@ -0,0 +1,8 @@ +extern int puts(const char *); +extern const char s[]; + +void f(void) +{ + puts(s); +} +
20100227-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090210_0.c =================================================================== --- 20090210_0.c (nonexistent) +++ 20090210_0.c (revision 826) @@ -0,0 +1,6 @@ +/* { dg-lto-do run } */ +/* { dg-suppress-ld-options {-fPIC} } */ +int foo (int x) +{ + return x; +}
20090210_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081120-2_1.c =================================================================== --- 20081120-2_1.c (nonexistent) +++ 20081120-2_1.c (revision 826) @@ -0,0 +1,2 @@ +int mumble = 0; +void foo(void) {}
20081120-2_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081201-2_1.c =================================================================== --- 20081201-2_1.c (nonexistent) +++ 20081201-2_1.c (revision 826) @@ -0,0 +1,5 @@ +void * +foo (void) +{ + return __builtin_return_address (0); +}
20081201-2_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081202-2_0.c =================================================================== --- 20081202-2_0.c (nonexistent) +++ 20081202-2_0.c (revision 826) @@ -0,0 +1,13 @@ +/* { dg-lto-options {{-fwhopr -O3}} } */ + +extern void exit (int); +extern void *foo (void); + +void *p; + +int +main () +{ + p = foo (); + exit (0); +}
20081202-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091020-3_0.c =================================================================== --- 20091020-3_0.c (nonexistent) +++ 20091020-3_0.c (revision 826) @@ -0,0 +1,20 @@ +/* { dg-lto-do assemble } */ + +typedef __SIZE_TYPE__ size_t; +static int stack_dir; +static void find_stack_direction () +{ + static char *addr = ((void *)0); + auto char dummy; + if (addr == ((void *)0)) + { + addr = &(dummy); + find_stack_direction (); + } +} +void * C_alloca (size_t size) +{ + if (stack_dir == 0) + find_stack_direction (); +} +
20091020-3_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: README =================================================================== --- README (nonexistent) +++ README (revision 826) @@ -0,0 +1,35 @@ +This directory contains tests for link-time optimization (LTO). +Tests in this directory may span multiple files, so the naming of +the files is significant. + +The name of every file must end with '_N' where N is an integer. +All the files with the same name base and different _N suffixes +will be compiled separately and linked together to form the final +executable. + +By default, each set of files will be compiled with list of +options listed in LTO_OPTIONS (../../lib/lto.exp), which can be +overwritten in the shell environment or using the 'dg-lto-options' +command in the main file of the set (i.e., the file with _0 +suffix). + +For example, given the files a_0.C a_1.C a_2.C, they will be +compiled as: + +$ g++ -c a_0.C +$ g++ -c a_1.C +$ g++ -c a_2.C +$ g++ -o a_0.o a_1.o a_2.o + +Tests that do not need more than one file are a special case +where there is a single file named 'foo_0.C'. + +The only supported dg-lto-do option are 'assemble', 'run' and 'link'. +Additionally, these can only be used in the main file. If +'assemble' is used, only the individual object files are +generated. If 'link' is used, the final executable is generated +but not executed (in this case, function main() needs to exist +but it does not need to do anything). If 'run' is used, the +final executable is generated and the resulting binary executed. + +The default value for dg-lto-do is 'run'.
README Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081204-1_0.c =================================================================== --- 20081204-1_0.c (nonexistent) +++ 20081204-1_0.c (revision 826) @@ -0,0 +1,7 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-fwhopr -fPIC -r -nostdlib}} } */ + +/* Tests for the absence during linking of: + lto1: error: type of 'i' does not match original declaration */ + +const int i[1];
20081204-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091005-1_0.c =================================================================== --- 20091005-1_0.c (nonexistent) +++ 20091005-1_0.c (revision 826) @@ -0,0 +1,3 @@ +/* { dg-lto-do run } */ + +const int i[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
20091005-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081204-2_0.c =================================================================== --- 20081204-2_0.c (nonexistent) +++ 20081204-2_0.c (revision 826) @@ -0,0 +1,5 @@ +/* { dg-lto-do link } */ +/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */ +/* { dg-lto-options {{-w -flto -fPIC -r -nostdlib}} } */ + +register int ri asm("edi");
20081204-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091005-2_0.c =================================================================== --- 20091005-2_0.c (nonexistent) +++ 20091005-2_0.c (revision 826) @@ -0,0 +1,11 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-fstrict-aliasing -flto}} } */ + +typedef struct { } t_commrec; +typedef struct { } t_fft_c; +void +solve_pme(t_commrec *cr) +{ + t_fft_c *ptr; +} +int main () { return 0; }
20091005-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090213_0.c =================================================================== --- 20090213_0.c (nonexistent) +++ 20090213_0.c (revision 826) @@ -0,0 +1,11 @@ +/* { dg-lto-do run } */ +#include + +extern int foo (int); + +main() +{ + int x = foo (10); + printf ("x is %d, foo is at 0x%p\n", x, foo); + return 0; +}
20090213_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081222_0.c =================================================================== --- 20081222_0.c (nonexistent) +++ 20081222_0.c (revision 826) @@ -0,0 +1,12 @@ +/* { dg-require-alias "" } */ +#include "20081222_0.h" + +extern void abort (void); + +int +main () +{ + if (x () == 7) + return 0; + abort (); +}
20081222_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081024_0.c =================================================================== --- 20081024_0.c (nonexistent) +++ 20081024_0.c (revision 826) @@ -0,0 +1,26 @@ +/* { dg-lto-do run } */ + +#include +#include +#include + +char * +myprintf (const char *fmt, ...) +{ + va_list args; + static char buf[80]; + + va_start (args, fmt); + (void) vsnprintf (buf, sizeof (buf), fmt, args); + va_end (args); + return buf; +} + +int +main () +{ + char *s; + + s = myprintf ("%s: %d\n", "foo", 1); + return strcmp (s, "foo: 1\n") != 0; +}
20081024_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091006-1_1.c =================================================================== --- 20091006-1_1.c (nonexistent) +++ 20091006-1_1.c (revision 826) @@ -0,0 +1,2 @@ +extern void bar (void); +void check3 (void) { bar (); }
20091006-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090312_1.c =================================================================== --- 20090312_1.c (nonexistent) +++ 20090312_1.c (revision 826) @@ -0,0 +1,9 @@ +int **foo (void) +{ + +} + +void mumble (char* a, char* b , char* c) +{ + +}
20090312_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091006-2_1.c =================================================================== --- 20091006-2_1.c (nonexistent) +++ 20091006-2_1.c (revision 826) @@ -0,0 +1 @@ +int a[16];
20091006-2_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081224_0.c =================================================================== --- 20081224_0.c (nonexistent) +++ 20081224_0.c (revision 826) @@ -0,0 +1,9 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-fwhopr -r -nostdlib -fPIC}} } */ +#include "20081224_0.h" + +extern struct foo x; + +void f(void) { + x.x = 0; +}
20081224_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090218-1_0.c =================================================================== --- 20090218-1_0.c (nonexistent) +++ 20090218-1_0.c (revision 826) @@ -0,0 +1,4 @@ +void set_mem_alias_set () __attribute__ ((always_inline)); +void emit_push_insn () { + set_mem_alias_set (); +}
20090218-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081125_1.c =================================================================== --- 20081125_1.c (nonexistent) +++ 20081125_1.c (revision 826) @@ -0,0 +1,4 @@ +int foo (int x) +{ + return x; +}
20081125_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20091027-1_1.c =================================================================== --- 20091027-1_1.c (nonexistent) +++ 20091027-1_1.c (revision 826) @@ -0,0 +1,9 @@ +typedef struct _xmlDict xmlDict; +struct _xmlDoc { + struct _xmlDict *dict; +}; +void xmlAddEntity(struct _xmlDoc *a) { + xmlDict * dict = a->dict; + xmlHashCreateDict(0, dict); +} +
20091027-1_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090218-2_0.c =================================================================== --- 20090218-2_0.c (nonexistent) +++ 20090218-2_0.c (revision 826) @@ -0,0 +1,3 @@ +void emit_push_insn () { + set_mem_alias_set (); +}
20090218-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081109_0.c =================================================================== --- 20081109_0.c (nonexistent) +++ 20081109_0.c (revision 826) @@ -0,0 +1,3 @@ +/* { dg-lto-do assemble } */ +/* { dg-lto-options {{-w -flto}} } */ +void Foo(void) { char bar[1]; free(bar); }
20081109_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090218_0.c =================================================================== --- 20090218_0.c (nonexistent) +++ 20090218_0.c (revision 826) @@ -0,0 +1,7 @@ +void __attribute__((noinline)) *foo1(void); +void __attribute__((noinline)) *foo2(void); + +int main(void) +{ + return foo1() != foo2(); +}
20090218_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081222_0.h =================================================================== --- 20081222_0.h (nonexistent) +++ 20081222_0.h (revision 826) @@ -0,0 +1 @@ +int x();
20081222_0.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090812_0.c =================================================================== --- 20090812_0.c (nonexistent) +++ 20090812_0.c (revision 826) @@ -0,0 +1,11 @@ +struct X; +struct Y +{ + struct X *p; + int i; +}; + +void foo (struct Y *p) +{ + p->i = 1; +}
20090812_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090219_0.c =================================================================== --- 20090219_0.c (nonexistent) +++ 20090219_0.c (revision 826) @@ -0,0 +1,28 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-O3 -fwhopr -fPIC -r -nostdlib}} } */ + +struct Foo { int f1, f2, f3, f4, f5; }; + +int x = 0; +struct Foo *foo; + +inline void Bar(int n){ + foo[x].f1 = 0; + foo[x].f2 = 0; + foo[x].f3 = 0; + foo[x].f4 = 0; + foo[x].f5 = n; +} + +int ei[1]; +inline void Baz(int n) { + if (ei[n] == 1) + Bar (0); + else if (ei[n] == 0) + Bar (1); +} + +void mumble(void) { + for (;;) + Baz (0); +}
20090219_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090914-1_0.c =================================================================== --- 20090914-1_0.c (nonexistent) +++ 20090914-1_0.c (revision 826) @@ -0,0 +1,13 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-flto -g -fvar-tracking-assignments}} } */ +/* { dg-suppress-ld-options "-g -fvar-tracking-assignments" } */ + +void foo() +{ + int hex = 0x4; +} + +int main() +{ + return 0; +}
20090914-1_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090218_2.c =================================================================== --- 20090218_2.c (nonexistent) +++ 20090218_2.c (revision 826) @@ -0,0 +1,6 @@ +void bar(void); +void __attribute__((noinline)) *foo2 (void) +{ + bar(); + return (void *) bar; +}
20090218_2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20081224_0.h =================================================================== --- 20081224_0.h (nonexistent) +++ 20081224_0.h (revision 826) @@ -0,0 +1,3 @@ +typedef struct foo { + int x; +} foo_t;
20081224_0.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090914-2_0.c =================================================================== --- 20090914-2_0.c (nonexistent) +++ 20090914-2_0.c (revision 826) @@ -0,0 +1,13 @@ +/* { dg-lto-do run } */ +/* { dg-skip-if "x86 only" { ! { x86_64-*-* i?86-*-* } } { "*" } { "" } } */ +/* { dg-skip-if "no .type" { *-*-darwin* } { "*" } { "" } } */ + +/* Doesn't work without this dummy function with -fwhopr. */ +int foo(void) { } + +asm(".text\n" + ".globl main\n" + "\t.type main,@function\n" + "main:\n" + "\txorl %eax, %eax\n" + "\tret\n");
20090914-2_0.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 20090717_1.c =================================================================== --- 20090717_1.c (nonexistent) +++ 20090717_1.c (revision 826) @@ -0,0 +1,11 @@ +struct variable { + const char *string; +}; +extern struct variable table[]; +int main(int argc, char *argv[]) +{ + struct variable *p; + for(p = table; p->string; p++) + ; + return 0; +}
20090717_1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.