From: Marek Polacek Date: Mon, 6 Oct 2014 08:38:03 +0000 (+0000) Subject: 20080924_0.c: Fix defaulting to int. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=845306e9be80514cfb6f544639582ec695319820;p=gcc.git 20080924_0.c: Fix defaulting to int. * gcc.dg/lto/20080924_0.c: Fix defaulting to int. * gcc.dg/lto/20090213_0.c: Likewise. * gcc.dg/lto/20090706-2_0.c: Likewise. * gcc.dg/lto/attr-weakref-1_1.c: Likewise. * gcc.dg/lto/attr-weakref-1_2.c: Likewise. * gcc.dg/lto/ipareference2_0.c: Likewise. * gcc.dg/lto/ipareference_0.c: Likewise. * gcc.dg/lto/ipareference_1.c: Likewise. * gcc.dg/lto/pr55703_0.c: Likewise. * gcc.dg/lto/resolutions_0.c: Likewise. * gcc.dg/lto/trans-mem-3_1.c: Likewise. * gcc.dg/lto/20081115_0.c: Fix defaulting to int. Fix implicit declarations. Mark function as gnu_inline. * gcc.dg/lto/20081118_0.c: Likewise. * gcc.dg/lto/20081201-1_0.c: Likewise. * gcc.dg/lto/20081115_1.c: Mark function as gnu_inline. * gcc.dg/lto/20081118_1.c: Likewise. * gcc.dg/lto/20081120-1_1.c: Likewise. * gcc.dg/lto/20081201-1_1.c: Likewise. * gcc.dg/lto/20081210-1_0.c: Likewise. * gcc.dg/lto/20090218-1_0.c: Likewise. * gcc.dg/lto/20091006-1_0.c: Likewise. * gcc.dg/lto/20090218-1_1.c: Use -fgnu89-inline. * gcc.dg/lto/20090218-2_1.c: Likewise. * gcc.dg/lto/materialize-1_0.c: Likewise. * gcc.dg/lto/20090218-2_0.c: Fix implicit declarations. * gcc.dg/lto/20091013-1_1.c: Likewise. * gcc.dg/lto/20091013-1_2.c: Likewise. * gcc.dg/lto/20091015-1_2.c: Likewise. * gcc.dg/lto/20091027-1_1.c: Likewise. * gcc.dg/lto/pr48622_0.c: Likewise. * gcc.dg/lto/attr-weakref-1_0.c: Fix implicit declarations. Fix defaulting to int. * gcc.dg/lto/pr47924_0.c: Return 0 instead of nothing. From-SVN: r215918 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 28593775481..6093b34bf3d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,40 @@ +2014-10-06 Marek Polacek + + * gcc.dg/lto/20080924_0.c: Fix defaulting to int. + * gcc.dg/lto/20090213_0.c: Likewise. + * gcc.dg/lto/20090706-2_0.c: Likewise. + * gcc.dg/lto/attr-weakref-1_1.c: Likewise. + * gcc.dg/lto/attr-weakref-1_2.c: Likewise. + * gcc.dg/lto/ipareference2_0.c: Likewise. + * gcc.dg/lto/ipareference_0.c: Likewise. + * gcc.dg/lto/ipareference_1.c: Likewise. + * gcc.dg/lto/pr55703_0.c: Likewise. + * gcc.dg/lto/resolutions_0.c: Likewise. + * gcc.dg/lto/trans-mem-3_1.c: Likewise. + * gcc.dg/lto/20081115_0.c: Fix defaulting to int. Fix implicit + declarations. Mark function as gnu_inline. + * gcc.dg/lto/20081118_0.c: Likewise. + * gcc.dg/lto/20081201-1_0.c: Likewise. + * gcc.dg/lto/20081115_1.c: Mark function as gnu_inline. + * gcc.dg/lto/20081118_1.c: Likewise. + * gcc.dg/lto/20081120-1_1.c: Likewise. + * gcc.dg/lto/20081201-1_1.c: Likewise. + * gcc.dg/lto/20081210-1_0.c: Likewise. + * gcc.dg/lto/20090218-1_0.c: Likewise. + * gcc.dg/lto/20091006-1_0.c: Likewise. + * gcc.dg/lto/20090218-1_1.c: Use -fgnu89-inline. + * gcc.dg/lto/20090218-2_1.c: Likewise. + * gcc.dg/lto/materialize-1_0.c: Likewise. + * gcc.dg/lto/20090218-2_0.c: Fix implicit declarations. + * gcc.dg/lto/20091013-1_1.c: Likewise. + * gcc.dg/lto/20091013-1_2.c: Likewise. + * gcc.dg/lto/20091015-1_2.c: Likewise. + * gcc.dg/lto/20091027-1_1.c: Likewise. + * gcc.dg/lto/pr48622_0.c: Likewise. + * gcc.dg/lto/attr-weakref-1_0.c: Fix implicit declarations. Fix + defaulting to int. + * gcc.dg/lto/pr47924_0.c: Return 0 instead of nothing. + 2014-10-06 Tobias Burnus * gfortran.dg/implicit_14.f90: New. diff --git a/gcc/testsuite/gcc.dg/lto/20080924_0.c b/gcc/testsuite/gcc.dg/lto/20080924_0.c index db7745077e2..86e22f0c8dc 100644 --- a/gcc/testsuite/gcc.dg/lto/20080924_0.c +++ b/gcc/testsuite/gcc.dg/lto/20080924_0.c @@ -1,6 +1,7 @@ /* { dg-lto-do assemble } */ /* { dg-lto-options {{-O2 -flto -funsigned-char}} } */ typedef unsigned int size_t; +void foo (const char *src, unsigned char *dst, size_t size) { int ch; diff --git a/gcc/testsuite/gcc.dg/lto/20081115_0.c b/gcc/testsuite/gcc.dg/lto/20081115_0.c index c9f4c803f3a..2174cbb0b48 100644 --- a/gcc/testsuite/gcc.dg/lto/20081115_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081115_0.c @@ -1,13 +1,14 @@ /* { dg-lto-options {{-O2 -DOPTIMIZE -flto -flto-partition=1to1} {-O0 -flto -flto-partition=1to1}} } */ extern void abort (void); +extern int foo (void); int f (void) { return 1; } -extern inline int +extern inline int __attribute__ ((gnu_inline)) e_inline_baz (void) { return 1 + f(); @@ -19,6 +20,7 @@ bar (void) return e_inline_baz (); } +int main () { #ifdef OPTIMIZE diff --git a/gcc/testsuite/gcc.dg/lto/20081115_1.c b/gcc/testsuite/gcc.dg/lto/20081115_1.c index 62ffa520000..bbde9abf684 100644 --- a/gcc/testsuite/gcc.dg/lto/20081115_1.c +++ b/gcc/testsuite/gcc.dg/lto/20081115_1.c @@ -1,4 +1,4 @@ -extern inline int +extern inline int __attribute__ ((gnu_inline)) e_inline_baz (void) { return 2 + 1; diff --git a/gcc/testsuite/gcc.dg/lto/20081118_0.c b/gcc/testsuite/gcc.dg/lto/20081118_0.c index b37eb31a46d..58e0dfdbcea 100644 --- a/gcc/testsuite/gcc.dg/lto/20081118_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081118_0.c @@ -2,8 +2,9 @@ extern void abort (void); extern int f (void); +extern int foo (void); -extern inline int +extern inline int __attribute__ ((gnu_inline)) e_inline_baz (void) { return 1 + f(); @@ -15,6 +16,7 @@ bar (void) return e_inline_baz (); } +int main () { #ifdef OPTIMIZE diff --git a/gcc/testsuite/gcc.dg/lto/20081118_1.c b/gcc/testsuite/gcc.dg/lto/20081118_1.c index f0a8c3c876b..509c290ee74 100644 --- a/gcc/testsuite/gcc.dg/lto/20081118_1.c +++ b/gcc/testsuite/gcc.dg/lto/20081118_1.c @@ -1,6 +1,6 @@ extern int f (void); -extern inline int +extern inline int __attribute__ ((gnu_inline)) e_inline_baz (void) { return 2 + f (); diff --git a/gcc/testsuite/gcc.dg/lto/20081120-1_1.c b/gcc/testsuite/gcc.dg/lto/20081120-1_1.c index 73d25000c91..f55eb48a14c 100644 --- a/gcc/testsuite/gcc.dg/lto/20081120-1_1.c +++ b/gcc/testsuite/gcc.dg/lto/20081120-1_1.c @@ -1,3 +1,3 @@ extern int stat(void) __asm__("" "stat64"); -extern inline int stat(void) { } +extern inline __attribute__((gnu_inline)) int stat(void) { } static void foo(void) { stat(); } diff --git a/gcc/testsuite/gcc.dg/lto/20081201-1_0.c b/gcc/testsuite/gcc.dg/lto/20081201-1_0.c index b6896446d7b..bd3e2513478 100644 --- a/gcc/testsuite/gcc.dg/lto/20081201-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081201-1_0.c @@ -1,6 +1,7 @@ /* { dg-lto-options {{-O2 -DOPTIMIZE -flto -flto-partition=1to1} {-O0 -flto -flto-partition=1to1}} } */ extern void abort (void); +extern int foo (void); int f (void) @@ -8,7 +9,7 @@ f (void) return 1; } -extern inline int +extern inline int __attribute__((gnu_inline)) e_inline_baz (void) { return 1 + f(); @@ -20,6 +21,7 @@ bar (void) return e_inline_baz (); } +int main () { #ifdef OPTIMIZE diff --git a/gcc/testsuite/gcc.dg/lto/20081201-1_1.c b/gcc/testsuite/gcc.dg/lto/20081201-1_1.c index f0a8c3c876b..509c290ee74 100644 --- a/gcc/testsuite/gcc.dg/lto/20081201-1_1.c +++ b/gcc/testsuite/gcc.dg/lto/20081201-1_1.c @@ -1,6 +1,6 @@ extern int f (void); -extern inline int +extern inline int __attribute__ ((gnu_inline)) e_inline_baz (void) { return 2 + f (); diff --git a/gcc/testsuite/gcc.dg/lto/20081210-1_0.c b/gcc/testsuite/gcc.dg/lto/20081210-1_0.c index 34e0ec400dd..80a1e9a2c03 100644 --- a/gcc/testsuite/gcc.dg/lto/20081210-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081210-1_0.c @@ -8,7 +8,7 @@ typedef unsigned int uintptr_t; extern void srand (uintptr_t); -inline void +inline void __attribute__ ((gnu_inline)) foo (uintptr_t seed) { srand (seed * seed); diff --git a/gcc/testsuite/gcc.dg/lto/20090213_0.c b/gcc/testsuite/gcc.dg/lto/20090213_0.c index 6387a0e4716..f36c890aec5 100644 --- a/gcc/testsuite/gcc.dg/lto/20090213_0.c +++ b/gcc/testsuite/gcc.dg/lto/20090213_0.c @@ -3,6 +3,7 @@ extern int foo (int); +int main() { int x = foo (10); diff --git a/gcc/testsuite/gcc.dg/lto/20090218-1_0.c b/gcc/testsuite/gcc.dg/lto/20090218-1_0.c index 750c2027510..ca98a492055 100644 --- a/gcc/testsuite/gcc.dg/lto/20090218-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20090218-1_0.c @@ -1,4 +1,4 @@ -void inline set_mem_alias_set () __attribute__ ((always_inline)); +void inline set_mem_alias_set () __attribute__ ((always_inline, gnu_inline)); void emit_push_insn () { set_mem_alias_set (); } diff --git a/gcc/testsuite/gcc.dg/lto/20090218-1_1.c b/gcc/testsuite/gcc.dg/lto/20090218-1_1.c index 7db2c85e4ce..7520cd3dc6c 100644 --- a/gcc/testsuite/gcc.dg/lto/20090218-1_1.c +++ b/gcc/testsuite/gcc.dg/lto/20090218-1_1.c @@ -1,3 +1,5 @@ +/* { dg-options "-fgnu89-inline" } */ + int main(void) { return 0; diff --git a/gcc/testsuite/gcc.dg/lto/20090218-2_0.c b/gcc/testsuite/gcc.dg/lto/20090218-2_0.c index 8857e7a6d21..3351c4ad96f 100644 --- a/gcc/testsuite/gcc.dg/lto/20090218-2_0.c +++ b/gcc/testsuite/gcc.dg/lto/20090218-2_0.c @@ -1,3 +1,4 @@ +void set_mem_alias_set (); void emit_push_insn () { set_mem_alias_set (); } diff --git a/gcc/testsuite/gcc.dg/lto/20090218-2_1.c b/gcc/testsuite/gcc.dg/lto/20090218-2_1.c index 5e103cb0359..f7cdb4253a6 100644 --- a/gcc/testsuite/gcc.dg/lto/20090218-2_1.c +++ b/gcc/testsuite/gcc.dg/lto/20090218-2_1.c @@ -1,3 +1,4 @@ +/* { dg-options { -fgnu89-inline } } */ typedef struct { } mem_attrs; int main(void) diff --git a/gcc/testsuite/gcc.dg/lto/20090706-2_0.c b/gcc/testsuite/gcc.dg/lto/20090706-2_0.c index 69da98b5cca..ce1ff7980f0 100644 --- a/gcc/testsuite/gcc.dg/lto/20090706-2_0.c +++ b/gcc/testsuite/gcc.dg/lto/20090706-2_0.c @@ -7,6 +7,7 @@ int foo (int size) return a[size - 10] + size; } +int main() { int x = foo (20); diff --git a/gcc/testsuite/gcc.dg/lto/20091006-1_0.c b/gcc/testsuite/gcc.dg/lto/20091006-1_0.c index 9b4356edc22..3d11f0ce65a 100644 --- a/gcc/testsuite/gcc.dg/lto/20091006-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20091006-1_0.c @@ -2,7 +2,7 @@ typedef void (*fnt) (void); void __attribute__((noinline)) bar (void) {} -extern inline void check3 (void) +extern inline void __attribute__((gnu_inline)) check3 (void) { bar (); } diff --git a/gcc/testsuite/gcc.dg/lto/20091013-1_1.c b/gcc/testsuite/gcc.dg/lto/20091013-1_1.c index ff890dce4c6..b75d0959cc3 100644 --- a/gcc/testsuite/gcc.dg/lto/20091013-1_1.c +++ b/gcc/testsuite/gcc.dg/lto/20091013-1_1.c @@ -54,6 +54,8 @@ 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 ); +int TranslateCharsetInfo( void *, CHARSETINFO *, int ); +unsigned int GetACP (void); static const struct gdi_obj_funcs font_funcs = { diff --git a/gcc/testsuite/gcc.dg/lto/20091013-1_2.c b/gcc/testsuite/gcc.dg/lto/20091013-1_2.c index 60bd1defa29..c8560413567 100644 --- a/gcc/testsuite/gcc.dg/lto/20091013-1_2.c +++ b/gcc/testsuite/gcc.dg/lto/20091013-1_2.c @@ -3,6 +3,7 @@ typedef struct HDC__ { int unused; } *HDC; typedef struct HFONT__ { int unused; } *HFONT; void* HeapAlloc(void*,unsigned int,unsigned long); +extern int memcmp (const void *, const void *, __SIZE_TYPE__); typedef struct tagLOGFONTW { @@ -72,6 +73,7 @@ static int get_glyph_index_linked(GdiFont *font, unsigned int c, GdiFont **linke static long load_VDMX(GdiFont*, long); extern int f1(void*,int); +extern int strcmpiW (const void*,const void*); static FT_Face OpenFontFace(GdiFont *font, void *face, long width, long height) { @@ -207,6 +209,8 @@ static int get_glyph_index_linked(GdiFont *font, unsigned int c, GdiFont **linke return 0; } +void load_sfnt_table (); + unsigned int WineEngGetFontData(GdiFont *font, unsigned int table, unsigned int offset, void* buf, unsigned int cbData) { diff --git a/gcc/testsuite/gcc.dg/lto/20091015-1_2.c b/gcc/testsuite/gcc.dg/lto/20091015-1_2.c index fd10680866a..0bc940bc1b1 100644 --- a/gcc/testsuite/gcc.dg/lto/20091015-1_2.c +++ b/gcc/testsuite/gcc.dg/lto/20091015-1_2.c @@ -1,5 +1,6 @@ #include "20091015-1_a.h" #include "20091015-1_b.h" +void foo (); void debug_optab_libfuncs (void) { foo (stderr, 4 ); } diff --git a/gcc/testsuite/gcc.dg/lto/20091027-1_1.c b/gcc/testsuite/gcc.dg/lto/20091027-1_1.c index d92394cc591..f869bdd2d9c 100644 --- a/gcc/testsuite/gcc.dg/lto/20091027-1_1.c +++ b/gcc/testsuite/gcc.dg/lto/20091027-1_1.c @@ -2,6 +2,7 @@ typedef struct _xmlDict xmlDict; struct _xmlDoc { struct _xmlDict *dict; }; +void xmlHashCreateDict (int, xmlDict *); void xmlAddEntity(struct _xmlDoc *a) { xmlDict * dict = a->dict; xmlHashCreateDict(0, dict); diff --git a/gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c index 1e02f68f2c1..84911cb211f 100644 --- a/gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c @@ -1,6 +1,8 @@ /* { dg-lto-do run } */ int first = 0; void abort (void); +void c (void); +void b (void); int second = 0; void callmealias (void) { @@ -21,6 +23,7 @@ void callmesecond (void) abort(); second = 1; } +int main() { c(); diff --git a/gcc/testsuite/gcc.dg/lto/attr-weakref-1_1.c b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_1.c index 67e6e1c1fdc..ae7bd8cbaaa 100644 --- a/gcc/testsuite/gcc.dg/lto/attr-weakref-1_1.c +++ b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_1.c @@ -1,6 +1,7 @@ extern void callmesecond(); static void callmealias() __attribute__((weakref ("callmesecond"))); +void b() { callmealias(); diff --git a/gcc/testsuite/gcc.dg/lto/attr-weakref-1_2.c b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_2.c index 6f382f61e5e..fad47c6258b 100644 --- a/gcc/testsuite/gcc.dg/lto/attr-weakref-1_2.c +++ b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_2.c @@ -1,6 +1,7 @@ extern void callmefirst(); static void callmealias() __attribute__((weakref ("callmefirst"))); +void c() { callmealias(); diff --git a/gcc/testsuite/gcc.dg/lto/ipareference2_0.c b/gcc/testsuite/gcc.dg/lto/ipareference2_0.c index f7ae0b4e316..db183dcd19b 100644 --- a/gcc/testsuite/gcc.dg/lto/ipareference2_0.c +++ b/gcc/testsuite/gcc.dg/lto/ipareference2_0.c @@ -7,6 +7,7 @@ void abort (void); int b,c,d,e,f; int *a[5]={&b,&c,&c,&e}; void other_ltrans (void); +int main() { other_ltrans (); diff --git a/gcc/testsuite/gcc.dg/lto/ipareference_0.c b/gcc/testsuite/gcc.dg/lto/ipareference_0.c index f8970f0e9ec..f8270d5d9fc 100644 --- a/gcc/testsuite/gcc.dg/lto/ipareference_0.c +++ b/gcc/testsuite/gcc.dg/lto/ipareference_0.c @@ -5,8 +5,9 @@ modify anything. This needs streaming cross file boundary summaries. */ extern int get_val (void); extern int set_val (void); -extern do_nothing (void); +extern void do_nothing (void); void abort (void); +int main() { int a; diff --git a/gcc/testsuite/gcc.dg/lto/ipareference_1.c b/gcc/testsuite/gcc.dg/lto/ipareference_1.c index c5d72faafb8..c363b2bb652 100644 --- a/gcc/testsuite/gcc.dg/lto/ipareference_1.c +++ b/gcc/testsuite/gcc.dg/lto/ipareference_1.c @@ -7,7 +7,7 @@ int get_val (void) { return val; } -__attribute__ ((__noinline__)) +__attribute__ ((__noinline__)) void do_nothing () { asm volatile ("":::"memory"); diff --git a/gcc/testsuite/gcc.dg/lto/materialize-1_0.c b/gcc/testsuite/gcc.dg/lto/materialize-1_0.c index 1751d65d293..8c0577b5408 100644 --- a/gcc/testsuite/gcc.dg/lto/materialize-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/materialize-1_0.c @@ -1,4 +1,4 @@ -/* { dg-lto-options {{ -O3 -flto -flto-partition=1to1}} } */ +/* { dg-lto-options {{ -O3 -flto -flto-partition=1to1 -fgnu89-inline }} } */ /* { dg-lto-do run } */ extern void clone_me (int, int); int a=15; diff --git a/gcc/testsuite/gcc.dg/lto/pr47924_0.c b/gcc/testsuite/gcc.dg/lto/pr47924_0.c index f7fdb44b073..1cecc3e8714 100644 --- a/gcc/testsuite/gcc.dg/lto/pr47924_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr47924_0.c @@ -8,7 +8,7 @@ int i __attribute__((used)); int main() { if (i == 0) - return; + return 0; *p = 0; diff --git a/gcc/testsuite/gcc.dg/lto/pr48622_0.c b/gcc/testsuite/gcc.dg/lto/pr48622_0.c index ffb5f62d6a0..c12f98c494d 100644 --- a/gcc/testsuite/gcc.dg/lto/pr48622_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr48622_0.c @@ -5,6 +5,7 @@ void abort(void); void exit(int); typedef unsigned int u8 __attribute__ ((mode (QI))); +u8 ashift_qi_1 (u8); u8 ashift_qi_0 (u8 n) diff --git a/gcc/testsuite/gcc.dg/lto/pr55703_0.c b/gcc/testsuite/gcc.dg/lto/pr55703_0.c index 1c4e04b3a37..9ab3e977e93 100644 --- a/gcc/testsuite/gcc.dg/lto/pr55703_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr55703_0.c @@ -47,6 +47,7 @@ int try (int num) { return -1; } +int main() { int i; diff --git a/gcc/testsuite/gcc.dg/lto/resolutions_0.c b/gcc/testsuite/gcc.dg/lto/resolutions_0.c index 9e59cb0690c..5274c8c0775 100644 --- a/gcc/testsuite/gcc.dg/lto/resolutions_0.c +++ b/gcc/testsuite/gcc.dg/lto/resolutions_0.c @@ -1,9 +1,11 @@ /* { dg-require-linker-plugin "" } */ /* { dg-extra-ld-options "-fuse-linker-plugin -O1" } */ +void link_error() { } +int main() { return 0; diff --git a/gcc/testsuite/gcc.dg/lto/trans-mem-3_1.c b/gcc/testsuite/gcc.dg/lto/trans-mem-3_1.c index 4b7f7d7510b..c323ac47ee2 100644 --- a/gcc/testsuite/gcc.dg/lto/trans-mem-3_1.c +++ b/gcc/testsuite/gcc.dg/lto/trans-mem-3_1.c @@ -4,6 +4,7 @@ extern int i; +int main() { __transaction_atomic { i = 0; }