Commit 8ece1ab3 by Marek Polacek Committed by Marek Polacek

20001012-1.c: Fix defaulting to int.

	* gcc.dg/20001012-1.c: Fix defaulting to int.
	* gcc.dg/20001012-2.c: Likewise.
	* gcc.dg/20001108-1.c: Likewise.
	* gcc.dg/20010516-1.c: Likewise.
	* gcc.dg/20011008-2.c: Likewise.
	* gcc.dg/20030612-1.c: Likewise.
	* gcc.dg/20040219-1.c: Likewise.
	* gcc.dg/20050603-2.c: Likewise.
	* gcc.dg/20070507-1.c: Likewise.
	* gcc.dg/attr-alias-3.c: Likewise.
	* gcc.dg/fastmath-1.c: Likewise.
	* gcc.dg/fork-instrumentation.c: Likewise.
	* gcc.dg/fwrapv-1.c: Likewise.
	* gcc.dg/fwrapv-2.c: Likewise.
	* gcc.dg/memmove-1.c: Likewise.
	* gcc.dg/non-local-goto-1.c: Likewise.
	* gcc.dg/non-local-goto-2.c: Likewise.
	* gcc.dg/noreturn-8.c: Likewise.
	* gcc.dg/parse-decl-after-if.c: Likewise.
	* gcc.dg/parse-decl-after-label.c: Likewise.
	* gcc.dg/pr25795-1.c: Likewise.
	* gcc.dg/pr25795.c: Likewise.
	* gcc.dg/pr28574.c: Likewise.
	* gcc.dg/pr30189.c: Likewise.
	* gcc.dg/pr31529-2.c: Likewise.
	* gcc.dg/pr33923.c: Likewise.
	* gcc.dg/pr34263.c: Likewise.
	* gcc.dg/pr36194.c: Likewise.
	* gcc.dg/pr45415.c: Likewise.
	* gcc.dg/pr47443.c: Likewise.
	* gcc.dg/pr47763.c: Likewise.
	* gcc.dg/pr49000.c: Likewise.
	* gcc.dg/pr50340.c: Likewise.
	* gcc.dg/webizer.c: Likewise.
	* gcc.dg/pr59940.c: Likewise.
	* gcc.dg/pr63186.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-int.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-int128.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-longlong.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-short.c: Likewise.
	* gcc.dg/simulate-thread/atomic-other-int.c: Likewise.
	* gcc.dg/sms-1.c: Likewise.
	* gcc.dg/unused-3.c: Likewise.
	* gcc.dg/varpool-1.c: Likewise.
	* gcc.dg/pr35899.c: Use -std=gnu89.
	* gcc.dg/pr59963-1.c: Likewise.
	* gcc.dg/redecl-15.c: Likewise.
	* gcc.dg/20041213-1.c: Likewise.
	* gcc.dg/20080820.c: Likewise.
	* gcc.dg/920413-1.c: Likewise.
	* gcc.dg/Wold-style-definition-1.c: Likewise.
	* gcc.dg/Wmissing-parameter-type-no.c: Likewise.
	* gcc.dg/decl-nospec-1.c: Likewise.
	* gcc.dg/decl-nospec-2.c: Likewise.
	* gcc.dg/decl-nospec-3.c: Likewise.
	* gcc.dg/bitfld-1.c: Likewise.
	* gcc.dg/bitfld-9.c: Likewise.
	* gcc.dg/parm-impl-decl-1.c: Likewise.
	* gcc.dg/parm-impl-decl-3.c: Likewise.
	* gcc.dg/pr18596-1.c: Likewise.
	* gcc.dg/pr18596-2.c: Likewise.
	* gcc.dg/pr18596-3.c: Likewise.
	* gcc.dg/pr60139.c: Likewise.
	* gcc.dg/utf-dflt.c: Likewise.
	* gcc.dg/utf-dflt2.c: Likewise.
	* gcc.dg/wtr-func-def-1.c: Likewise.
	* gcc.dg/declspec-5.c: Likewise.
	* gcc.dg/declspec-6.c: Likewise.
	* gcc.dg/ftrapv-2.c: Likewise.
	* gcc.dg/20020430-1.c: Fix implicit declarations.
	* gcc.dg/20030702-1.c: Likewise.
	* gcc.dg/20040127-2.c: Likewise.
	* gcc.dg/20041122-1.c: Likewise.
	* gcc.dg/20050309-1.c: Likewise.
	* gcc.dg/20061026.c: Likewise.
	* gcc.dg/20101010-1.c: Likewise.
	* gcc.dg/Werror-1.c: Likewise.
	* gcc.dg/Werror-10.c: Likewise.
	* gcc.dg/Werror-11.c: Likewise.
	* gcc.dg/Werror-12.c: Likewise.
	* gcc.dg/Werror-2.c: Likewise.
	* gcc.dg/Werror-3.c: Likewise.
	* gcc.dg/Werror-4.c: Likewise.
	* gcc.dg/Werror-5.c: Likewise.
	* gcc.dg/Werror-6.c: Likewise.
	* gcc.dg/Werror-7.c: Likewise.
	* gcc.dg/Werror-8.c: Likewise.
	* gcc.dg/Wstrict-overflow-20.c: Likewise.
	* gcc.dg/cpp/trad/macroargs.c: Likewise.
	* gcc.dg/delay-slot-2.c: Likewise.
	* gcc.dg/errno-1.c: Likewise.
	* gcc.dg/globalalias.c: Likewise.
	* gcc.dg/inline-3.c: Likewise.
	* gcc.dg/localalias.c: Likewise.
	* gcc.dg/pr19633-1.c: Likewise.
	* gcc.dg/pr19633.c: Likewise.
	* gcc.dg/pr23408.c: Likewise.
	* gcc.dg/pr23470-1.c: Likewise.
	* gcc.dg/pr28121.c: Likewise.
	* gcc.dg/pr28243.c: Likewise.
	* gcc.dg/pr30260.c: Likewise.
	* gcc.dg/pr32573.c: Likewise.
	* gcc.dg/pr33826.c: Likewise.
	* gcc.dg/pr35065.c: Likewise.
	* gcc.dg/pr38616.c: Likewise.
	* gcc.dg/pr39867.c: Likewise.
	* gcc.dg/pr41470.c: Likewise.
	* gcc.dg/pr41837.c: Likewise.
	* gcc.dg/pr44024.c: Likewise.
	* gcc.dg/pr44699.c: Likewise.
	* gcc.dg/pr46252.c: Likewise.
	* gcc.dg/pr46878-1.c: Likewise.
	* gcc.dg/pr50908-3.c: Likewise.
	* gcc.dg/pr51796.c: Likewise.
	* gcc.dg/pr55150-2.c: Likewise.
	* gcc.dg/pr55833.c: Likewise.
	* gcc.dg/pr59350.c: Likewise.
	* gcc.dg/pr59418.c: Likewise.
	* gcc.dg/pr60647-2.c: Likewise.
	* gcc.dg/uninit-suppress.c: Likewise.
	* gcc.dg/uninit-suppress_2.c: Likewise.
	* gcc.dg/20030805-1.c: Use -fgnu89-inline.
	* gcc.dg/always_inline.c: Likewise.
	* gcc.dg/always_inline2.c: Likewise.
	* gcc.dg/always_inline3.c: Likewise.
	* gcc.dg/builtin-apply4.c: Likewise.
	* gcc.dg/declspec-7.c: Likewise.
	* gcc.dg/inline-1.c: Likewise.
	* gcc.dg/va-arg-pack-1.c: Likewise.
	* gcc.dg/winline-2.c: Likewise.
	* gcc.dg/winline-3.c: Likewise.
	* gcc.dg/winline-5.c: Likewise.
	* gcc.dg/winline-6.c: Likewise.
	* gcc.dg/winline-7.c: Likewise.
	* gcc.dg/funcorder.c: Fix implicit declarations.  Fix defaulting to
	int. 
	* gcc.dg/inline-33.c: Likewise.
	* gcc.dg/pr27861-1.c: Likewise.
	* gcc.dg/pr28888.c: Likewise.
	* gcc.dg/pr29254.c: Likewise.
	* gcc.dg/pr50908.c: Likewise.
	* gcc.dg/pr60647-1.c: Likewise.
	* gcc.dg/pragma-diag-1.c: Likewise.
	* gcc.dg/pr31529-1.c: Use -fgnu89-inline.  Fix defaulting to int.
	* gcc.dg/winline-9.c: Likewise.
	* gcc.dg/pr52808.c: Return 0 instead of nothing.

From-SVN: r215925
parent 1f347158
2014-10-06 Marek Polacek <polacek@redhat.com> 2014-10-06 Marek Polacek <polacek@redhat.com>
* gcc.dg/20001012-1.c: Fix defaulting to int.
* gcc.dg/20001012-2.c: Likewise.
* gcc.dg/20001108-1.c: Likewise.
* gcc.dg/20010516-1.c: Likewise.
* gcc.dg/20011008-2.c: Likewise.
* gcc.dg/20030612-1.c: Likewise.
* gcc.dg/20040219-1.c: Likewise.
* gcc.dg/20050603-2.c: Likewise.
* gcc.dg/20070507-1.c: Likewise.
* gcc.dg/attr-alias-3.c: Likewise.
* gcc.dg/fastmath-1.c: Likewise.
* gcc.dg/fork-instrumentation.c: Likewise.
* gcc.dg/fwrapv-1.c: Likewise.
* gcc.dg/fwrapv-2.c: Likewise.
* gcc.dg/memmove-1.c: Likewise.
* gcc.dg/non-local-goto-1.c: Likewise.
* gcc.dg/non-local-goto-2.c: Likewise.
* gcc.dg/noreturn-8.c: Likewise.
* gcc.dg/parse-decl-after-if.c: Likewise.
* gcc.dg/parse-decl-after-label.c: Likewise.
* gcc.dg/pr25795-1.c: Likewise.
* gcc.dg/pr25795.c: Likewise.
* gcc.dg/pr28574.c: Likewise.
* gcc.dg/pr30189.c: Likewise.
* gcc.dg/pr31529-2.c: Likewise.
* gcc.dg/pr33923.c: Likewise.
* gcc.dg/pr34263.c: Likewise.
* gcc.dg/pr36194.c: Likewise.
* gcc.dg/pr45415.c: Likewise.
* gcc.dg/pr47443.c: Likewise.
* gcc.dg/pr47763.c: Likewise.
* gcc.dg/pr49000.c: Likewise.
* gcc.dg/pr50340.c: Likewise.
* gcc.dg/webizer.c: Likewise.
* gcc.dg/pr59940.c: Likewise.
* gcc.dg/pr63186.c: Likewise.
* gcc.dg/simulate-thread/atomic-load-int.c: Likewise.
* gcc.dg/simulate-thread/atomic-load-int128.c: Likewise.
* gcc.dg/simulate-thread/atomic-load-longlong.c: Likewise.
* gcc.dg/simulate-thread/atomic-load-short.c: Likewise.
* gcc.dg/simulate-thread/atomic-other-int.c: Likewise.
* gcc.dg/sms-1.c: Likewise.
* gcc.dg/unused-3.c: Likewise.
* gcc.dg/varpool-1.c: Likewise.
* gcc.dg/pr35899.c: Use -std=gnu89.
* gcc.dg/pr59963-1.c: Likewise.
* gcc.dg/redecl-15.c: Likewise.
* gcc.dg/20041213-1.c: Likewise.
* gcc.dg/20080820.c: Likewise.
* gcc.dg/920413-1.c: Likewise.
* gcc.dg/Wold-style-definition-1.c: Likewise.
* gcc.dg/Wmissing-parameter-type-no.c: Likewise.
* gcc.dg/decl-nospec-1.c: Likewise.
* gcc.dg/decl-nospec-2.c: Likewise.
* gcc.dg/decl-nospec-3.c: Likewise.
* gcc.dg/bitfld-1.c: Likewise.
* gcc.dg/bitfld-9.c: Likewise.
* gcc.dg/parm-impl-decl-1.c: Likewise.
* gcc.dg/parm-impl-decl-3.c: Likewise.
* gcc.dg/pr18596-1.c: Likewise.
* gcc.dg/pr18596-2.c: Likewise.
* gcc.dg/pr18596-3.c: Likewise.
* gcc.dg/pr60139.c: Likewise.
* gcc.dg/utf-dflt.c: Likewise.
* gcc.dg/utf-dflt2.c: Likewise.
* gcc.dg/wtr-func-def-1.c: Likewise.
* gcc.dg/declspec-5.c: Likewise.
* gcc.dg/declspec-6.c: Likewise.
* gcc.dg/ftrapv-2.c: Likewise.
* gcc.dg/20020430-1.c: Fix implicit declarations.
* gcc.dg/20030702-1.c: Likewise.
* gcc.dg/20040127-2.c: Likewise.
* gcc.dg/20041122-1.c: Likewise.
* gcc.dg/20050309-1.c: Likewise.
* gcc.dg/20061026.c: Likewise.
* gcc.dg/20101010-1.c: Likewise.
* gcc.dg/Werror-1.c: Likewise.
* gcc.dg/Werror-10.c: Likewise.
* gcc.dg/Werror-11.c: Likewise.
* gcc.dg/Werror-12.c: Likewise.
* gcc.dg/Werror-2.c: Likewise.
* gcc.dg/Werror-3.c: Likewise.
* gcc.dg/Werror-4.c: Likewise.
* gcc.dg/Werror-5.c: Likewise.
* gcc.dg/Werror-6.c: Likewise.
* gcc.dg/Werror-7.c: Likewise.
* gcc.dg/Werror-8.c: Likewise.
* gcc.dg/Wstrict-overflow-20.c: Likewise.
* gcc.dg/cpp/trad/macroargs.c: Likewise.
* gcc.dg/delay-slot-2.c: Likewise.
* gcc.dg/errno-1.c: Likewise.
* gcc.dg/globalalias.c: Likewise.
* gcc.dg/inline-3.c: Likewise.
* gcc.dg/localalias.c: Likewise.
* gcc.dg/pr19633-1.c: Likewise.
* gcc.dg/pr19633.c: Likewise.
* gcc.dg/pr23408.c: Likewise.
* gcc.dg/pr23470-1.c: Likewise.
* gcc.dg/pr28121.c: Likewise.
* gcc.dg/pr28243.c: Likewise.
* gcc.dg/pr30260.c: Likewise.
* gcc.dg/pr32573.c: Likewise.
* gcc.dg/pr33826.c: Likewise.
* gcc.dg/pr35065.c: Likewise.
* gcc.dg/pr38616.c: Likewise.
* gcc.dg/pr39867.c: Likewise.
* gcc.dg/pr41470.c: Likewise.
* gcc.dg/pr41837.c: Likewise.
* gcc.dg/pr44024.c: Likewise.
* gcc.dg/pr44699.c: Likewise.
* gcc.dg/pr46252.c: Likewise.
* gcc.dg/pr46878-1.c: Likewise.
* gcc.dg/pr50908-3.c: Likewise.
* gcc.dg/pr51796.c: Likewise.
* gcc.dg/pr55150-2.c: Likewise.
* gcc.dg/pr55833.c: Likewise.
* gcc.dg/pr59350.c: Likewise.
* gcc.dg/pr59418.c: Likewise.
* gcc.dg/pr60647-2.c: Likewise.
* gcc.dg/uninit-suppress.c: Likewise.
* gcc.dg/uninit-suppress_2.c: Likewise.
* gcc.dg/20030805-1.c: Use -fgnu89-inline.
* gcc.dg/always_inline.c: Likewise.
* gcc.dg/always_inline2.c: Likewise.
* gcc.dg/always_inline3.c: Likewise.
* gcc.dg/builtin-apply4.c: Likewise.
* gcc.dg/declspec-7.c: Likewise.
* gcc.dg/inline-1.c: Likewise.
* gcc.dg/va-arg-pack-1.c: Likewise.
* gcc.dg/winline-2.c: Likewise.
* gcc.dg/winline-3.c: Likewise.
* gcc.dg/winline-5.c: Likewise.
* gcc.dg/winline-6.c: Likewise.
* gcc.dg/winline-7.c: Likewise.
* gcc.dg/funcorder.c: Fix implicit declarations. Fix defaulting to
int.
* gcc.dg/inline-33.c: Likewise.
* gcc.dg/pr27861-1.c: Likewise.
* gcc.dg/pr28888.c: Likewise.
* gcc.dg/pr29254.c: Likewise.
* gcc.dg/pr50908.c: Likewise.
* gcc.dg/pr60647-1.c: Likewise.
* gcc.dg/pragma-diag-1.c: Likewise.
* gcc.dg/pr31529-1.c: Use -fgnu89-inline. Fix defaulting to int.
* gcc.dg/winline-9.c: Likewise.
* gcc.dg/pr52808.c: Return 0 instead of nothing.
2014-10-06 Marek Polacek <polacek@redhat.com>
* gcc.dg/ipa/inline-2.c: Fix implicit declarations. * gcc.dg/ipa/inline-2.c: Fix implicit declarations.
* gcc.dg/ipa/inline-4.c: Likewise. * gcc.dg/ipa/inline-4.c: Likewise.
* gcc.dg/ipa/inline-5.c: Likewise. * gcc.dg/ipa/inline-5.c: Likewise.
......
...@@ -10,6 +10,7 @@ foo (void) ...@@ -10,6 +10,7 @@ foo (void)
return (__extension__ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) { __l: 0x3f800000UL }).__d); return (__extension__ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) { __l: 0x3f800000UL }).__d);
} }
int
main () main ()
{ {
if (foo() != 1.0) if (foo() != 1.0)
......
...@@ -28,6 +28,7 @@ double baz (const char *x) ...@@ -28,6 +28,7 @@ double baz (const char *x)
return (__extension__ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) { __l: 0x3f800000UL }).__d); return (__extension__ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) { __l: 0x3f800000UL }).__d);
} }
int
main () main ()
{ {
if (baz("") != 1.0) if (baz("") != 1.0)
......
...@@ -25,6 +25,7 @@ long bar (long i, double x) ...@@ -25,6 +25,7 @@ long bar (long i, double x)
return foo (x); return foo (x);
} }
int
main() main()
{ {
if (bar (0, 2.0) != 26) if (bar (0, 2.0) != 26)
......
/* { dg-options "-fshow-column" } */ /* { dg-options "-fshow-column" } */
void
foo() foo()
{ {
char d; char d;
......
...@@ -7,6 +7,7 @@ extern void exit (int); ...@@ -7,6 +7,7 @@ extern void exit (int);
struct { union {int x; int y;}; int q; } b; struct { union {int x; int y;}; int q; } b;
union { struct {int x;}; int q; } e; union { struct {int x;}; int q; } e;
int
main() main()
{ {
b.y = 10; b.y = 10;
......
...@@ -105,6 +105,11 @@ typedef struct _RectObjRec { ...@@ -105,6 +105,11 @@ typedef struct _RectObjRec {
typedef struct _RectObjRec *RectObj; typedef struct _RectObjRec *RectObj;
SmeObject DoGetEventEntry(); SmeObject DoGetEventEntry();
int XtWidgetToApplicationContext();
void XtAppError();
void Unhighlight();
void XtMoveWidget();
void XWarpPointer();
SmeObject SmeObject
GetEventEntry(Widget w, XEvent *event) GetEventEntry(Widget w, XEvent *event)
......
...@@ -14,6 +14,7 @@ void foo() ...@@ -14,6 +14,7 @@ void foo()
}); });
} }
int
main() main()
{ {
B = 5; B = 5;
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
/* { dg-options "-O2 -fpic -fprofile-arcs" } */ /* { dg-options "-O2 -fpic -fprofile-arcs" } */
/* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } */ /* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } */
int fork (void);
void test (void) void test (void)
{ {
fork (); fork ();
......
/* Test that gcc understands that the call to g might clobber i. */ /* Test that gcc understands that the call to g might clobber i. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O2" } */ /* { dg-options "-O2 -fgnu89-inline" } */
__inline int f () __inline int f ()
{ {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O" } */ /* { dg-options "-O" } */
void Get16u();
typedef struct { int ThumbnailSize; } ImageInfo_t; typedef struct { int ThumbnailSize; } ImageInfo_t;
double ConvertAnyFormat(void) double ConvertAnyFormat(void)
......
...@@ -14,6 +14,7 @@ double foo(double a, double b, double c) ...@@ -14,6 +14,7 @@ double foo(double a, double b, double c)
return (a+b+c); return (a+b+c);
} }
int
main () main ()
{ {
double f1, f2, f3, f4, f5, f6, f7, f8, f9,f10; double f1, f2, f3, f4, f5, f6, f7, f8, f9,f10;
......
/* PR rtl-optimization/18611 */ /* PR rtl-optimization/18611 */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O1 -fmove-loop-invariants" } */ /* { dg-options "-O1 -fmove-loop-invariants" } */
void dumpCineonChannelInfo ();
typedef struct { typedef struct {
int channels_per_image; int channels_per_image;
int channel[8]; int channel[8];
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-fshow-column" } */ /* { dg-options "-fshow-column -std=gnu89" } */
/* test redeclarations with void and implicit int */ /* test redeclarations with void and implicit int */
extern foo1(); /* { dg-message "8:note: previous declaration" } */ extern foo1(); /* { dg-message "8:note: previous declaration" } */
extern void foo1(); /* { dg-error "13:conflicting types" } */ extern void foo1(); /* { dg-error "13:conflicting types" } */
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
/* { dg-require-profiling "-fprofile-generate" } */ /* { dg-require-profiling "-fprofile-generate" } */
/* { dg-options "-O2 -fprofile-generate" } */ /* { dg-options "-O2 -fprofile-generate" } */
void lookup ();
int hash ();
void error ();
char * char *
test(char *ret, int *counter, void *schema, test(char *ret, int *counter, void *schema,
const char* name, const char *namespace, const char* name, const char *namespace,
......
...@@ -12,6 +12,8 @@ void set (struct s*, int) __attribute__((noinline)); ...@@ -12,6 +12,8 @@ void set (struct s*, int) __attribute__((noinline));
void set (struct s* p, int flags) { void set (struct s* p, int flags) {
p->g = flags << 1; p->g = flags << 1;
} }
int
main() { main() {
struct s foo = {0 , 0, 3, 0}; struct s foo = {0 , 0, 3, 0};
set (&foo, -1); set (&foo, -1);
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
large for a 16bit constant and therefore should reserve the literal large for a 16bit constant and therefore should reserve the literal
pool base pointer. */ pool base pointer. */
void g ();
int f () { int f () {
char a[32608]; char a[32608];
......
...@@ -36,7 +36,7 @@ int __attribute__((noinline)) foo (char *p_str1) ...@@ -36,7 +36,7 @@ int __attribute__((noinline)) foo (char *p_str1)
int __attribute__((noinline)) loop_next (int *p_table, char *p_table_head) int __attribute__((noinline)) loop_next (int *p_table, char *p_table_head)
{ {
static loop_next = 0; static int loop_next = 0;
if (loop_next == 1) if (loop_next == 1)
return 1; return 1;
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-fshow-column -fms-extensions -pedantic" } */ /* { dg-options "-fshow-column -fms-extensions -pedantic -std=gnu89" } */
struct { struct a { int x; }; int bar; } hot; /* { dg-warning "29:ISO C90 doesn't support unnamed" } */ struct { struct a { int x; }; int bar; } hot; /* { dg-warning "29:ISO C90 doesn't support unnamed" } */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-crossjumping" } */ /* { dg-options "-O2 -fno-crossjumping" } */
int bar1 ();
int bar2 ();
int foo (void) int foo (void)
{ {
int len; int len;
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-Wtraditional" } */ /* { dg-options "-Wtraditional -std=gnu89" } */
int int
x (b) x (b)
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#pragma GCC diagnostic error "-Waddress" #pragma GCC diagnostic error "-Waddress"
void grill ();
void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */ void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
int i; int i;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#pragma GCC diagnostic error "-Waddress" #pragma GCC diagnostic error "-Waddress"
void grill ();
void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */ void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
int i; int i;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#pragma GCC diagnostic warning "-Waddress" #pragma GCC diagnostic warning "-Waddress"
void grill ();
void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */ void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
int i; int i;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#pragma GCC diagnostic ignored "-Waddress" #pragma GCC diagnostic ignored "-Waddress"
void grill ();
void __attribute__((dj)) bar() { } /* { dg-warning "attribute directive ignored" } */ void __attribute__((dj)) bar() { } /* { dg-warning "attribute directive ignored" } */
int i; int i;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
/* This one is the baseline. Make sure with no option we get no /* This one is the baseline. Make sure with no option we get no
warnings. */ warnings. */
void grill ();
void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */ void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */
int i; int i;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* Make sure the command line option enables the warning. */ /* Make sure the command line option enables the warning. */
void grill ();
void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */ void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */
int i; int i;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#pragma GCC diagnostic error "-Waddress" #pragma GCC diagnostic error "-Waddress"
void grill ();
void __attribute__((dj)) bar() { } /* { dg-warning "attribute directive ignored" } */ void __attribute__((dj)) bar() { } /* { dg-warning "attribute directive ignored" } */
int i; int i;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
/* Make sure -Werror turns warnings in to errors. */ /* Make sure -Werror turns warnings in to errors. */
void grill ();
void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */ void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
int i; int i;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
/* Make sure -Werror=foo emits an error and not a warning */ /* Make sure -Werror=foo emits an error and not a warning */
void grill ();
void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */ void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */
int i; int i;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
/* Make sure -Wno-error= overrides -Werror. */ /* Make sure -Wno-error= overrides -Werror. */
void grill ();
void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */ void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
int i; int i;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#pragma GCC diagnostic warning "-Waddress" #pragma GCC diagnostic warning "-Waddress"
void grill ();
void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */ void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */
int i; int i;
......
/* Test that we can disable -Wmissing-parameter-type */ /* Test that we can disable -Wmissing-parameter-type */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-Wall -Wextra -Wno-missing-parameter-type" } */ /* { dg-options "-Wall -Wextra -Wno-missing-parameter-type -std=gnu89" } */
int foo(bar) { return bar;} /* { dg-bogus "type of 'bar' defaults to 'int'" } */ int foo(bar) { return bar;} /* { dg-bogus "type of 'bar' defaults to 'int'" } */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* Origin: Andreas Jaeger <aj@suse.de> */ /* Origin: Andreas Jaeger <aj@suse.de> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-Wold-style-definition" } */ /* { dg-options "-Wold-style-definition -std=gnu89" } */
void void
bar (a) int a; { } /* { dg-warning "old-style function definition" } */ bar (a) int a; { } /* { dg-warning "old-style function definition" } */
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
/* Don't warn about an overflow in a copied loop header. We used to /* Don't warn about an overflow in a copied loop header. We used to
get a warning in value numbering. This is PR 33565. */ get a warning in value numbering. This is PR 33565. */
void do_something ();
void f (int m, int n) void f (int m, int n)
{ {
int j; int j;
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2" } */ /* { dg-options "-O2 -fgnu89-inline" } */
#include <stdarg.h> #include <stdarg.h>
inline __attribute__ ((always_inline)) void inline __attribute__ ((always_inline)) void
e(int t, ...) /* { dg-error "variable argument lists" } */ e(int t, ...) /* { dg-error "variable argument lists" } */
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2" } */ /* { dg-options "-O2 -fgnu89-inline" } */
inline __attribute__ ((always_inline)) void t(void); /* { dg-error "body not available" } */ inline __attribute__ ((always_inline)) void t(void); /* { dg-error "body not available" } */
void void
q(void) q(void)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2" } */ /* { dg-options "-O2 -fgnu89-inline" } */
int do_something_evil (void); int do_something_evil (void);
inline __attribute__ ((always_inline)) void inline __attribute__ ((always_inline)) void
q2(void) /* { dg-error "recursive inlining" } */ q2(void) /* { dg-error "recursive inlining" } */
......
...@@ -51,6 +51,7 @@ static void lf4(void) {} ...@@ -51,6 +51,7 @@ static void lf4(void) {}
extern ftype Af4a __attribute__((alias ("lf4"))); extern ftype Af4a __attribute__((alias ("lf4")));
static ftype *pf4a = &Af4a; static ftype *pf4a = &Af4a;
int
main() { main() {
#ifdef __mips #ifdef __mips
/* Use real asm for MIPS, to stop the assembler warning about /* Use real asm for MIPS, to stop the assembler warning about
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
Source: Neil Booth, 26 Jan 2002. Source: Neil Booth, 26 Jan 2002.
*/ */
/* { dg-options -pedantic } */ /* { dg-options "-pedantic -std=gnu89" } */
enum foo {e1 = 0, e2, e3, e4, e5}; enum foo {e1 = 0, e2, e3, e4, e5};
......
/* Test -funsigned-bitfields works. */ /* Test -funsigned-bitfields works. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-funsigned-bitfields -fsigned-char" } */ /* { dg-options "-funsigned-bitfields -fsigned-char -std=gnu89" } */
typedef char c; typedef char c;
typedef signed char sc; typedef signed char sc;
......
/* PR tree-optimization/20076 */ /* PR tree-optimization/20076 */
/* { dg-options "-O2 -Wmissing-noreturn" } */ /* { dg-options "-O2 -Wmissing-noreturn -fgnu89-inline" } */
/* { dg-options "-O2 -mno-mmx" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ /* { dg-options "-O2 -mno-mmx" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
/* { dg-do run } */ /* { dg-do run } */
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#define g(x) x #define g(x) x
extern void abort (void); extern void abort (void);
extern int strcmp (const char *, const char *);
void testquoting () void testquoting ()
{ {
......
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
-pedantic. Test with no options. */ -pedantic. Test with no options. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "" } */ /* { dg-options "-std=gnu89" } */
foo(); /* { dg-warning "data definition has no type or storage class" } */ foo(); /* { dg-warning "data definition has no type or storage class" } */
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
-pedantic. Test with -pedantic. */ -pedantic. Test with -pedantic. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-pedantic" } */ /* { dg-options "-std=gnu89 -pedantic" } */
foo(); /* { dg-warning "data definition has no type or storage class" } */ foo(); /* { dg-warning "data definition has no type or storage class" } */
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
-pedantic. Test with -pedantic-errors. */ -pedantic. Test with -pedantic-errors. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-pedantic-errors" } */ /* { dg-options "-std=gnu89 -pedantic-errors" } */
foo(); /* { dg-error "data definition has no type or storage class" } */ foo(); /* { dg-error "data definition has no type or storage class" } */
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
-pedantic. */ -pedantic. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-pedantic" } */ /* { dg-options "-std=gnu89 -pedantic" } */
/* If a declaration does not declare a declarator, it must declare a /* If a declaration does not declare a declarator, it must declare a
tag or the members of an enumeration, and must only contain one tag or the members of an enumeration, and must only contain one
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
-pedantic-errors. */ -pedantic-errors. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-pedantic-errors" } */ /* { dg-options "-std=gnu89 -pedantic-errors" } */
/* If a declaration does not declare a declarator, it must declare a /* If a declaration does not declare a declarator, it must declare a
tag or the members of an enumeration, and must only contain one tag or the members of an enumeration, and must only contain one
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
gcc.dg/tls/diag-*.c. */ gcc.dg/tls/diag-*.c. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "" } */ /* { dg-options "-fgnu89-inline" } */
/* Duplicate specifiers. */ /* Duplicate specifiers. */
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
extern int printf (__const char *__restrict __format, ...); extern int printf (__const char *__restrict __format, ...);
extern void print_c_condition (const char *); extern void print_c_condition (const char *);
extern void print_host_wide_int (long);
enum decision_type enum decision_type
{ {
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
void do_not_optimize_away ();
int main() int main()
{ {
void * volatile p; void * volatile p;
......
...@@ -9,6 +9,7 @@ if ( ( dists [ 0 ] > 0 ) == ( dists [ 1 ] > 0 ) ) ...@@ -9,6 +9,7 @@ if ( ( dists [ 0 ] > 0 ) == ( dists [ 1 ] > 0 ) )
return k; return k;
return 0; return 0;
} }
int
main() { main() {
float dists[16] = { 0., 1., 1., 0., 0., -1., -1., 0., float dists[16] = { 0., 1., 1., 0., 0., -1., -1., 0.,
1., 1., 1., -1., -1., 1., -1., -1. }; 1., 1., 1., -1., -1., 1., -1., -1. };
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O0 -fprofile-generate" } */ /* { dg-options "-O0 -fprofile-generate" } */
int fork(void); int fork(void);
int
t() t()
{ {
fork (); fork ();
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
/* { dg-require-effective-target trapping } */ /* { dg-require-effective-target trapping } */
extern void abort(void); extern void abort(void);
extern int abs(int);
extern long labs(long); extern long labs(long);
int __attribute__((noinline)) int __attribute__((noinline))
......
...@@ -4,15 +4,17 @@ ...@@ -4,15 +4,17 @@
/* In unit-at-time the functions should be assembled in order /* In unit-at-time the functions should be assembled in order
e q t main, so we realize that they are pure. */ e q t main, so we realize that they are pure. */
void link_error (void);
static int mem; static int mem;
static int e(void) __attribute__ ((noinline)); static int e(void) __attribute__ ((noinline));
static int q(void) __attribute__ ((noinline)); static int q(void) __attribute__ ((noinline));
static int t(void) __attribute__ ((noinline)); static int t(void) __attribute__ ((noinline));
int
main() main()
{ {
return t(); return t();
} }
static t() static int t()
{ {
int r,e; int r,e;
if (mem) if (mem)
......
...@@ -17,6 +17,7 @@ int test(int x) ...@@ -17,6 +17,7 @@ int test(int x)
return (2*x)/2; return (2*x)/2;
} }
int
main() main()
{ {
int x = INT_MAX; int x = INT_MAX;
......
...@@ -17,6 +17,7 @@ int test(int x) ...@@ -17,6 +17,7 @@ int test(int x)
return (2*x)/2; return (2*x)/2;
} }
int
main() main()
{ {
int x = INT_MAX; int x = INT_MAX;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
{ dg-additional-sources "globalalias-2.c" } */ { dg-additional-sources "globalalias-2.c" } */
extern int test2count; extern int test2count;
extern void abort (void); extern void abort (void);
extern void tt ();
int testcount; int testcount;
static static
void test(void) void test(void)
......
/* Verify that DECL_INLINE gets copied between DECLs properly. */ /* Verify that DECL_INLINE gets copied between DECLs properly. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O1" } */ /* { dg-options "-O1 -fgnu89-inline" } */
/* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-not "xyzzy?,%r" } else { scan-assembler-not "xyzzy" } } } */ /* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-not "xyzzy?,%r" } else { scan-assembler-not "xyzzy" } } } */
/* Test that declaration followed by definition inlines. */ /* Test that declaration followed by definition inlines. */
......
/* { dg-options "-O2 -funit-at-a-time" } */ /* { dg-options "-O2 -funit-at-a-time" } */
/* { dg-final { scan-assembler-not "big_function_2" } } */ /* { dg-final { scan-assembler-not "big_function_2" } } */
int t(void);
static void static void
big_function_2(void); big_function_2(void);
void void
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
int i; int i;
int foo (); int foo ();
int bar ();
int
main () main ()
{ {
return foo (i); return foo (i);
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
{ dg-require-alias "" } { dg-require-alias "" }
{ dg-additional-sources "localalias-2.c" } */ { dg-additional-sources "localalias-2.c" } */
extern void abort (void); extern void abort (void);
extern void tt (void);
extern int test2count; extern int test2count;
int testcount; int testcount;
__attribute__ ((weak,noinline)) __attribute__ ((weak,noinline))
......
...@@ -11,6 +11,7 @@ domem (void *dest, const void *src, int len) ...@@ -11,6 +11,7 @@ domem (void *dest, const void *src, int len)
{ {
__builtin_memmove (dest, src, len); __builtin_memmove (dest, src, len);
} }
int
t() t()
{ {
domem (b,a,100); domem (b,a,100);
......
...@@ -5,14 +5,14 @@ extern void abort (void); ...@@ -5,14 +5,14 @@ extern void abort (void);
int global; int global;
static foo(void) __attribute__((noinline)); static int foo(void) __attribute__((noinline));
static foo(void) static int foo(void)
{ {
global = 1; global = 1;
} }
static bar(void) static int bar(void)
{ {
foo (); foo ();
} }
......
...@@ -5,14 +5,14 @@ extern void abort (void); ...@@ -5,14 +5,14 @@ extern void abort (void);
int global; int global;
static foo(void) __attribute__((noinline)); static int foo(void) __attribute__((noinline));
static foo(void) static int foo(void)
{ {
global = 1; global = 1;
} }
static bar(void) static int bar(void)
{ {
foo (); foo ();
global = 0; global = 0;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
void exit (int); void exit (int);
void noreturn_autodetection_failed (); void noreturn_autodetection_failed ();
__attribute__ ((noinline)) __attribute__ ((noinline)) int
detect_noreturn () detect_noreturn ()
{ {
exit (0); exit (0);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function prototypes. Bug 18239. */ function prototypes. Bug 18239. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */ /* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "" } */ /* { dg-options "-std=gnu89" } */
/* Implicit function declaration in attribute in definition (testcase /* Implicit function declaration in attribute in definition (testcase
from bug). */ from bug). */
......
/* Like parm-impl-decl-1.c, but with -g. PR 43381. */ /* Like parm-impl-decl-1.c, but with -g. PR 43381. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */ /* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-g" } */ /* { dg-options "-g -std=gnu89" } */
int int
foo (int __attribute__ ((__mode__ (vector_size(8)))) i) /* { dg-warning "'__mode__' attribute ignored" } */ foo (int __attribute__ ((__mode__ (vector_size(8)))) i) /* { dg-warning "'__mode__' attribute ignored" } */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{ dg-options "-fsyntax-only" } { dg-options "-fsyntax-only" }
*/ */
void f(x) void f(int x)
{ {
if (x > 1) if (x > 1)
int ret = 1; /* { dg-error "expected expression before 'int'" } */ int ret = 1; /* { dg-error "expected expression before 'int'" } */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{ dg-options "-fsyntax-only" } { dg-options "-fsyntax-only" }
*/ */
int f(x) int f(int x)
{ {
if (x > 1) if (x > 1)
{ {
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-fno-unit-at-a-time" } */ /* { dg-options "-fno-unit-at-a-time -std=gnu89" } */
int f(int i) int f(int i)
{ {
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-funit-at-a-time" } */ /* { dg-options "-funit-at-a-time -std=gnu89" } */
int f(int i) int f(int i)
{ {
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "" } */ /* { dg-options "-std=gnu89" } */
int foo () int foo ()
{ {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
extern void abort (void); extern void abort (void);
extern void link_error (void);
struct S struct S
{ {
......
...@@ -12,6 +12,9 @@ struct T ...@@ -12,6 +12,9 @@ struct T
struct S s; struct S s;
}; };
void link_error (void);
int bar (struct S, int);
void void
foo (int a, struct T b) foo (int a, struct T b)
{ {
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } */ /* { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } */
int g ();
static __inline__ int f () { return g (); } static __inline__ int f () { return g (); }
int g () { return f (); } int g () { return f (); }
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ffast-math -fdump-tree-original" } */ /* { dg-options "-O2 -ffast-math -fdump-tree-original" } */
void link_error (void);
int f(double a, double b) int f(double a, double b)
{ {
if (((a*a) + (b*b))<0) if (((a*a) + (b*b))<0)
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
extern const char *mystr; /* normally in a header */ extern const char *mystr; /* normally in a header */
const char *mystr; const char *mystr;
int
main() main()
{ {
} }
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
extern const char *mystr; /* normally in a header */ extern const char *mystr; /* normally in a header */
const char *mystr __attribute__ ((externally_visible)); const char *mystr __attribute__ ((externally_visible));
int
main() main()
{ {
} }
...@@ -52,6 +52,8 @@ struct sim_state ...@@ -52,6 +52,8 @@ struct sim_state
sim_cpu cpu[1]; sim_cpu cpu[1];
}; };
typedef address_word instruction_address; typedef address_word instruction_address;
void trace_result_word1 ();
int
do_dror (SIM_DESC sd, instruction_address cia, int MY_INDEX, unsigned64 x, do_dror (SIM_DESC sd, instruction_address cia, int MY_INDEX, unsigned64 x,
unsigned64 y) unsigned64 y)
{ {
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
int GetMouseButton ();
int ParsePos ();
short short
GetCmd () GetCmd ()
{ {
......
...@@ -14,6 +14,8 @@ struct gpsdisplay { ...@@ -14,6 +14,8 @@ struct gpsdisplay {
struct displayfuncs *funcs; struct displayfuncs *funcs;
}; };
void PSDoArc ();
static void PSMyArc(double cx, double cy, double radx, double rady, double sa, static void PSMyArc(double cx, double cy, double radx, double rady, double sa,
double ta) double ta)
{ {
......
...@@ -71,4 +71,5 @@ yasm_list_modules(yasm_module_type type, ...@@ -71,4 +71,5 @@ yasm_list_modules(yasm_module_type type,
} }
} }
int
main() {} main() {}
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
static const unsigned char _c30[] = static const unsigned char _c30[] =
"statistic of allocated integer registers:"; "statistic of allocated integer registers:";
void Out__LongInt ();
int
Allocate__WriteStats (void) Allocate__WriteStats (void)
{ {
register int i0, i1, i2, i3, i4, i5; register int i0, i1, i2, i3, i4, i5;
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O3 -Werror" } */ /* { dg-options "-O3 -Werror" } */
int value_compare ();
int
list_compare (int * list1) list_compare (int * list1)
{ {
if (list1) if (list1)
value_compare (); value_compare ();
} }
func1 (int * f){} int func1 (int * f){}
int
value_compare (int * a) value_compare (int * a)
{ {
if (a) if (a)
list_compare (a); list_compare (a);
} }
int
func2 (const int * fb) func2 (const int * fb)
{ {
func1 ((int *) fb); /* { dg-bogus "discards qualifiers" } */ func1 ((int *) fb); /* { dg-bogus "discards qualifiers" } */
......
...@@ -12,7 +12,7 @@ void baz (int i) ...@@ -12,7 +12,7 @@ void baz (int i)
} }
void void
bar (i) bar (int i)
{ {
baz (i); baz (i);
} }
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
/* { dg-options "-pedantic -O" } */ /* { dg-options "-pedantic -O" } */
#include <limits.h> #include <limits.h>
void link_error (void);
enum A { enum A {
A1 = 0, A1 = 0,
A2 = A1 - 1 A2 = A1 - 1
......
/* { dg-do link } */ /* { dg-do link } */
/* { dg-require-effective-target lto } */ /* { dg-require-effective-target lto } */
/* { dg-options "-flto" } */ /* { dg-options "-flto -fgnu89-inline" } */
/* { dg-additional-sources "pr31529-2.c" } */ /* { dg-additional-sources "pr31529-2.c" } */
int
getline () getline ()
{ {
} }
......
/* { dg-do compile } */ /* { dg-do compile } */
extern __inline extern __inline
int
getline () getline ()
{ {
} }
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O3" } */ /* { dg-options "-O3" } */
long long bar (void *);
int int
foo (void *x, long long *y) foo (void *x, long long *y)
{ {
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
/* { dg-require-effective-target nonpic } */ /* { dg-require-effective-target nonpic } */
/* { dg-options "-O1 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const" } */ /* { dg-options "-O1 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const" } */
int recurse1 (int);
int recurse2b (int);
int norecurse1b (int);
int recurese1 (int i) int recurese1 (int i)
{ {
return recurse1 (i+1); return recurse1 (i+1);
......
...@@ -12,6 +12,7 @@ typedef struct ...@@ -12,6 +12,7 @@ typedef struct
} }
ProtocolOperations; ProtocolOperations;
static const ProtocolOperations *protocol; static const ProtocolOperations *protocol;
int
brl_readCommand (void) brl_readCommand (void)
{ {
unsigned long int keys; unsigned long int keys;
......
...@@ -14,6 +14,7 @@ int count = 0; ...@@ -14,6 +14,7 @@ int count = 0;
void sub( struct s *p, struct s **pp ); void sub( struct s *p, struct s **pp );
int look( struct s *p, struct s **pp ); int look( struct s *p, struct s **pp );
int
main() main()
{ {
struct s *pp; struct s *pp;
......
...@@ -97,6 +97,7 @@ static inline uint32_t bs_read1( bs_t *s ) { ...@@ -97,6 +97,7 @@ static inline uint32_t bs_read1( bs_t *s ) {
return 0; return 0;
} }
int Open ( vlc_object_t * ); int Open ( vlc_object_t * );
int vlc_module_set ( module_t *, enum vlc_module_properties, void *);
void Close( vlc_object_t * ); void Close( vlc_object_t * );
__attribute__((visibility("default"))) int vlc_entry__0_9_0f ( module_t *p_module ) { __attribute__((visibility("default"))) int vlc_entry__0_9_0f ( module_t *p_module ) {
{ {
...@@ -128,6 +129,7 @@ struct decoder_sys_t { ...@@ -128,6 +129,7 @@ struct decoder_sys_t {
}; };
enum { NAL_SLICE = 1, NAL_SLICE_IDR = 5, NAL_SPS = 7, NAL_AU_DELIMITER= 9 }; enum { NAL_SLICE = 1, NAL_SLICE_IDR = 5, NAL_SPS = 7, NAL_AU_DELIMITER= 9 };
static block_t *ParseNALBlock( decoder_t *, block_t * ); static block_t *ParseNALBlock( decoder_t *, block_t * );
int U16_AT ( uint8_t * );
int Open( vlc_object_t *p_this ) { int Open( vlc_object_t *p_this ) {
decoder_t *p_dec = (decoder_t*)p_this; decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys; decoder_sys_t *p_sys;
......
/* PR tree-optimization/35899 */ /* PR tree-optimization/35899 */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2" } */ /* { dg-options "-std=gnu89 -O2" } */
int int
foo (void) foo (void)
......
...@@ -22,6 +22,7 @@ g (long long a) ...@@ -22,6 +22,7 @@ g (long long a)
asm (""); asm ("");
} }
int
main () main ()
{ {
g (0x1234567887654321ll); g (0x1234567887654321ll);
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#include <stdio.h> #include <stdio.h>
extern int strcmp (const char *, const char *);
#define BUFFER "1234567890abcdefghijklmno" #define BUFFER "1234567890abcdefghijklmno"
int main (void) int main (void)
{ {
......
/* { dg-do link } */ /* { dg-do link } */
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
extern void link_error (void);
int main (void) int main (void)
{ {
int exp = -1; int exp = -1;
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-fexceptions" } */ /* { dg-options "-fexceptions" } */
void cf (void *);
void * void *
af (void *a) af (void *a)
{ {
......
...@@ -13,6 +13,10 @@ typedef struct { T3 h; } T6; ...@@ -13,6 +13,10 @@ typedef struct { T3 h; } T6;
typedef struct { int i; } *T7; typedef struct { int i; } *T7;
struct S3 { T6 j; T7 k; }; struct S3 { T6 j; T7 k; };
void f5 (T4);
void f6 (void (*)(T4));
void f7 (void (*)(T5, T1 *));
void void
f1 (T4 x) f1 (T4 x)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment