From ee712eab15dfd0dfe178ff42492c20a9a9aaeae8 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 3 Aug 2004 09:22:26 +0100 Subject: [PATCH] 20001023-1.c, [...]: Declare built-in functions used. * gcc.dg/20001023-1.c, gcc.dg/20001108-1.c, gcc.dg/20001117-1.c, gcc.dg/20010202-1.c, gcc.dg/20011008-2.c, gcc.dg/20011214-1.c, gcc.dg/20020201-1.c, gcc.dg/20020312-2.c, gcc.dg/20020426-2.c, gcc.dg/20030331-2.c, gcc.dg/20030612-1.c, gcc.dg/20030926-1.c, gcc.dg/20031216-1.c, gcc.dg/20031218-3.c, gcc.dg/20040305-2.c, gcc.dg/980226-1.c, gcc.dg/Wreturn-type2.c, gcc.dg/Wunreachable-6.c, gcc.dg/Wunreachable-7.c, gcc.dg/align-1.c, gcc.dg/builtin-prefetch-1.c, gcc.dg/builtins-17.c, gcc.dg/builtins-19.c, gcc.dg/builtins-2.c, gcc.dg/builtins-20.c, gcc.dg/builtins-21.c, gcc.dg/builtins-7.c, gcc.dg/builtins-8.c, gcc.dg/cpp/19930510-1.c, gcc.dg/cpp/charconst-3.c, gcc.dg/cpp/charconst-4.c, gcc.dg/cpp/mi6.c, gcc.dg/cpp/tr-paste.c, gcc.dg/cpp/trad/mi6.c, gcc.dg/cpp/trad/paste.c, gcc.dg/cpp/trad/strify.c, gcc.dg/fastmath-1.c, gcc.dg/fshort-wchar.c, gcc.dg/i386-387-7.c, gcc.dg/i386-387-8.c, gcc.dg/i386-asm-1.c, gcc.dg/i386-cadd.c, gcc.dg/i386-fpcvt-3.c, gcc.dg/i386-loop-3.c, gcc.dg/i386-memset-1.c, gcc.dg/loop-2.c, gcc.dg/nest.c, gcc.dg/noncompile/971104-1.c, gcc.dg/noncompile/990416-1.c, gcc.dg/noncompile/scope.c, gcc.dg/pack-test-4.c, gcc.dg/pack-test-5.c, gcc.dg/pch/inline-4.c, gcc.dg/postincr-1.c, gcc.dg/pr10392-1.c, gcc.dg/pragma-align.c, gcc.dg/profile-generate-1.c, gcc.dg/sibcall-1.c, gcc.dg/sibcall-2.c, gcc.dg/sibcall-3.c, gcc.dg/sibcall-4.c, gcc.dg/sibcall-5.c, gcc.dg/sibcall-6.c, gcc.dg/switch-warn-1.c, gcc.dg/switch-warn-2.c, gcc.dg/torture/builtin-attr-1.c, gcc.dg/torture/builtin-math-1.c, gcc.dg/torture/builtin-noret-2.c, gcc.dg/trampoline-1.c, gcc.dg/tree-ssa/20030703-1.c, gcc.dg/tree-ssa/20030703-2.c, gcc.dg/tree-ssa/20030708-1.c, gcc.dg/tree-ssa/20030709-3.c, gcc.dg/tree-ssa/20030710-1.c, gcc.dg/tree-ssa/20030711-1.c, gcc.dg/tree-ssa/20030729-1.c, gcc.dg/tree-ssa/20030730-1.c, gcc.dg/tree-ssa/20030730-2.c, gcc.dg/tree-ssa/20030731-1.c, gcc.dg/tree-ssa/20030807-11.c, gcc.dg/tree-ssa/20030807-2.c, gcc.dg/tree-ssa/20030807-5.c, gcc.dg/tree-ssa/20030807-7.c, gcc.dg/tree-ssa/20030808-1.c, gcc.dg/tree-ssa/20030814-1.c, gcc.dg/tree-ssa/20030814-2.c, gcc.dg/tree-ssa/20030814-3.c, gcc.dg/tree-ssa/20030814-4.c, gcc.dg/tree-ssa/20030814-5.c, gcc.dg/tree-ssa/20030814-6.c, gcc.dg/tree-ssa/20030814-7.c, gcc.dg/tree-ssa/20030815-1.c, gcc.dg/tree-ssa/20030907-1.c, gcc.dg/tree-ssa/20030917-3.c, gcc.dg/tree-ssa/20030922-1.c, gcc.dg/tree-ssa/20031113-1.c, gcc.dg/tree-ssa/20040121-1.c, gcc.dg/tree-ssa/20040319-1.c, gcc.dg/tree-ssa/20040324-1.c, gcc.dg/tree-ssa/20040326-1.c, gcc.dg/tree-ssa/20040326-2.c, gcc.dg/tree-ssa/20040517-1.c, gcc.dg/tree-ssa/ssa-ccp-10.c, gcc.dg/tree-ssa/ssa-pre-1.c, gcc.dg/tree-ssa/tailcall-1.c, gcc.dg/tree-ssa/tailrecursion-5.c, gcc.dg/ultrasp3.c, gcc.dg/winline-7.c, gcc.misc-tests/bprob-1.c, gcc.misc-tests/bprob-2.c, gcc.misc-tests/gcov-3.c, gcc.misc-tests/gcov-4.c, gcc.misc-tests/gcov-4b.c, gcc.misc-tests/gcov-6.c, gcc.misc-tests/gcov-7.c, gcc.misc-tests/i386-pf-3dnow-1.c, gcc.misc-tests/i386-pf-athlon-1.c, gcc.misc-tests/i386-pf-none-1.c, gcc.misc-tests/i386-pf-sse-1.c, objc.dg/nested-func-1.m, objc.dg/special/unclaimed-category-1.m: Declare built-in functions used. * gcc.dg/torture/builtin-attr-1.c (nexttoward): Use FPTEST2ARG2. From-SVN: r85465 --- gcc/testsuite/ChangeLog | 59 ++++++++++ gcc/testsuite/gcc.dg/20001023-1.c | 3 + gcc/testsuite/gcc.dg/20001108-1.c | 3 + gcc/testsuite/gcc.dg/20001117-1.c | 3 + gcc/testsuite/gcc.dg/20010202-1.c | 3 + gcc/testsuite/gcc.dg/20011008-2.c | 3 + gcc/testsuite/gcc.dg/20011214-1.c | 3 + gcc/testsuite/gcc.dg/20020201-1.c | 3 + gcc/testsuite/gcc.dg/20020312-2.c | 2 + gcc/testsuite/gcc.dg/20020426-2.c | 2 + gcc/testsuite/gcc.dg/20030331-2.c | 2 + gcc/testsuite/gcc.dg/20030612-1.c | 2 + gcc/testsuite/gcc.dg/20030926-1.c | 3 + gcc/testsuite/gcc.dg/20031216-1.c | 2 + gcc/testsuite/gcc.dg/20031218-3.c | 2 + gcc/testsuite/gcc.dg/20040305-2.c | 2 + gcc/testsuite/gcc.dg/980226-1.c | 1 + gcc/testsuite/gcc.dg/Wreturn-type2.c | 2 + gcc/testsuite/gcc.dg/Wunreachable-6.c | 3 + gcc/testsuite/gcc.dg/Wunreachable-7.c | 3 + gcc/testsuite/gcc.dg/align-1.c | 2 + gcc/testsuite/gcc.dg/builtin-prefetch-1.c | 2 + gcc/testsuite/gcc.dg/builtins-17.c | 2 +- gcc/testsuite/gcc.dg/builtins-19.c | 3 + gcc/testsuite/gcc.dg/builtins-2.c | 22 ++++ gcc/testsuite/gcc.dg/builtins-20.c | 10 ++ gcc/testsuite/gcc.dg/builtins-21.c | 10 ++ gcc/testsuite/gcc.dg/builtins-7.c | 10 ++ gcc/testsuite/gcc.dg/builtins-8.c | 2 + gcc/testsuite/gcc.dg/cpp/19930510-1.c | 2 + gcc/testsuite/gcc.dg/cpp/charconst-3.c | 2 + gcc/testsuite/gcc.dg/cpp/charconst-4.c | 2 + gcc/testsuite/gcc.dg/cpp/mi6.c | 2 + gcc/testsuite/gcc.dg/cpp/tr-paste.c | 2 + gcc/testsuite/gcc.dg/cpp/trad/mi6.c | 2 + gcc/testsuite/gcc.dg/cpp/trad/paste.c | 2 + gcc/testsuite/gcc.dg/cpp/trad/strify.c | 1 + gcc/testsuite/gcc.dg/fastmath-1.c | 2 + gcc/testsuite/gcc.dg/fshort-wchar.c | 2 + gcc/testsuite/gcc.dg/i386-387-7.c | 3 + gcc/testsuite/gcc.dg/i386-387-8.c | 2 + gcc/testsuite/gcc.dg/i386-asm-1.c | 1 + gcc/testsuite/gcc.dg/i386-cadd.c | 2 + gcc/testsuite/gcc.dg/i386-fpcvt-3.c | 1 + gcc/testsuite/gcc.dg/i386-loop-3.c | 3 + gcc/testsuite/gcc.dg/i386-memset-1.c | 4 + gcc/testsuite/gcc.dg/loop-2.c | 3 + gcc/testsuite/gcc.dg/nest.c | 2 + gcc/testsuite/gcc.dg/noncompile/971104-1.c | 1 + gcc/testsuite/gcc.dg/noncompile/990416-1.c | 1 + gcc/testsuite/gcc.dg/noncompile/scope.c | 2 + gcc/testsuite/gcc.dg/pack-test-4.c | 2 + gcc/testsuite/gcc.dg/pack-test-5.c | 2 + gcc/testsuite/gcc.dg/pch/inline-4.c | 1 + gcc/testsuite/gcc.dg/postincr-1.c | 2 + gcc/testsuite/gcc.dg/pr10392-1.c | 1 + gcc/testsuite/gcc.dg/pragma-align.c | 2 + gcc/testsuite/gcc.dg/profile-generate-1.c | 2 + gcc/testsuite/gcc.dg/sibcall-1.c | 3 + gcc/testsuite/gcc.dg/sibcall-2.c | 3 + gcc/testsuite/gcc.dg/sibcall-3.c | 3 + gcc/testsuite/gcc.dg/sibcall-4.c | 3 + gcc/testsuite/gcc.dg/sibcall-5.c | 2 + gcc/testsuite/gcc.dg/sibcall-6.c | 3 + gcc/testsuite/gcc.dg/switch-warn-1.c | 3 + gcc/testsuite/gcc.dg/switch-warn-2.c | 3 + gcc/testsuite/gcc.dg/torture/builtin-attr-1.c | 105 ++++++++++++++---- gcc/testsuite/gcc.dg/torture/builtin-math-1.c | 28 +++++ .../gcc.dg/torture/builtin-noret-2.c | 3 + gcc/testsuite/gcc.dg/trampoline-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030703-1.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c | 4 +- gcc/testsuite/gcc.dg/tree-ssa/20030708-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030729-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030730-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030730-2.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030731-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030807-11.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030807-5.c | 3 +- gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/20030808-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030814-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030814-2.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030814-3.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030814-6.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030814-7.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030815-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20030907-1.c | 3 + gcc/testsuite/gcc.dg/tree-ssa/20030917-3.c | 3 +- gcc/testsuite/gcc.dg/tree-ssa/20030922-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20031113-1.c | 2 + gcc/testsuite/gcc.dg/tree-ssa/20040121-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20040319-1.c | 2 + gcc/testsuite/gcc.dg/tree-ssa/20040324-1.c | 3 + gcc/testsuite/gcc.dg/tree-ssa/20040326-1.c | 3 + gcc/testsuite/gcc.dg/tree-ssa/20040326-2.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c | 2 + gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-1.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/tailcall-1.c | 1 + .../gcc.dg/tree-ssa/tailrecursion-5.c | 3 + gcc/testsuite/gcc.dg/ultrasp3.c | 3 + gcc/testsuite/gcc.dg/winline-7.c | 2 + gcc/testsuite/gcc.misc-tests/bprob-1.c | 2 + gcc/testsuite/gcc.misc-tests/bprob-2.c | 3 + gcc/testsuite/gcc.misc-tests/gcov-3.c | 3 + gcc/testsuite/gcc.misc-tests/gcov-4.c | 2 + gcc/testsuite/gcc.misc-tests/gcov-4b.c | 2 + gcc/testsuite/gcc.misc-tests/gcov-6.c | 2 + gcc/testsuite/gcc.misc-tests/gcov-7.c | 3 + .../gcc.misc-tests/i386-pf-3dnow-1.c | 2 + .../gcc.misc-tests/i386-pf-athlon-1.c | 2 + gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c | 2 + gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c | 2 + gcc/testsuite/objc.dg/nested-func-1.m | 1 + .../objc.dg/special/unclaimed-category-1.m | 2 + 122 files changed, 450 insertions(+), 25 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4ae35e2c75d..2ed388d8762 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,62 @@ +2004-08-03 Joseph S. Myers + + * gcc.dg/20001023-1.c, gcc.dg/20001108-1.c, gcc.dg/20001117-1.c, + gcc.dg/20010202-1.c, gcc.dg/20011008-2.c, gcc.dg/20011214-1.c, + gcc.dg/20020201-1.c, gcc.dg/20020312-2.c, gcc.dg/20020426-2.c, + gcc.dg/20030331-2.c, gcc.dg/20030612-1.c, gcc.dg/20030926-1.c, + gcc.dg/20031216-1.c, gcc.dg/20031218-3.c, gcc.dg/20040305-2.c, + gcc.dg/980226-1.c, gcc.dg/Wreturn-type2.c, + gcc.dg/Wunreachable-6.c, gcc.dg/Wunreachable-7.c, + gcc.dg/align-1.c, gcc.dg/builtin-prefetch-1.c, + gcc.dg/builtins-17.c, gcc.dg/builtins-19.c, gcc.dg/builtins-2.c, + gcc.dg/builtins-20.c, gcc.dg/builtins-21.c, gcc.dg/builtins-7.c, + gcc.dg/builtins-8.c, gcc.dg/cpp/19930510-1.c, + gcc.dg/cpp/charconst-3.c, gcc.dg/cpp/charconst-4.c, + gcc.dg/cpp/mi6.c, gcc.dg/cpp/tr-paste.c, gcc.dg/cpp/trad/mi6.c, + gcc.dg/cpp/trad/paste.c, gcc.dg/cpp/trad/strify.c, + gcc.dg/fastmath-1.c, gcc.dg/fshort-wchar.c, gcc.dg/i386-387-7.c, + gcc.dg/i386-387-8.c, gcc.dg/i386-asm-1.c, gcc.dg/i386-cadd.c, + gcc.dg/i386-fpcvt-3.c, gcc.dg/i386-loop-3.c, + gcc.dg/i386-memset-1.c, gcc.dg/loop-2.c, gcc.dg/nest.c, + gcc.dg/noncompile/971104-1.c, gcc.dg/noncompile/990416-1.c, + gcc.dg/noncompile/scope.c, gcc.dg/pack-test-4.c, + gcc.dg/pack-test-5.c, gcc.dg/pch/inline-4.c, gcc.dg/postincr-1.c, + gcc.dg/pr10392-1.c, gcc.dg/pragma-align.c, + gcc.dg/profile-generate-1.c, gcc.dg/sibcall-1.c, + gcc.dg/sibcall-2.c, gcc.dg/sibcall-3.c, gcc.dg/sibcall-4.c, + gcc.dg/sibcall-5.c, gcc.dg/sibcall-6.c, gcc.dg/switch-warn-1.c, + gcc.dg/switch-warn-2.c, gcc.dg/torture/builtin-attr-1.c, + gcc.dg/torture/builtin-math-1.c, gcc.dg/torture/builtin-noret-2.c, + gcc.dg/trampoline-1.c, gcc.dg/tree-ssa/20030703-1.c, + gcc.dg/tree-ssa/20030703-2.c, gcc.dg/tree-ssa/20030708-1.c, + gcc.dg/tree-ssa/20030709-3.c, gcc.dg/tree-ssa/20030710-1.c, + gcc.dg/tree-ssa/20030711-1.c, gcc.dg/tree-ssa/20030729-1.c, + gcc.dg/tree-ssa/20030730-1.c, gcc.dg/tree-ssa/20030730-2.c, + gcc.dg/tree-ssa/20030731-1.c, gcc.dg/tree-ssa/20030807-11.c, + gcc.dg/tree-ssa/20030807-2.c, gcc.dg/tree-ssa/20030807-5.c, + gcc.dg/tree-ssa/20030807-7.c, gcc.dg/tree-ssa/20030808-1.c, + gcc.dg/tree-ssa/20030814-1.c, gcc.dg/tree-ssa/20030814-2.c, + gcc.dg/tree-ssa/20030814-3.c, gcc.dg/tree-ssa/20030814-4.c, + gcc.dg/tree-ssa/20030814-5.c, gcc.dg/tree-ssa/20030814-6.c, + gcc.dg/tree-ssa/20030814-7.c, gcc.dg/tree-ssa/20030815-1.c, + gcc.dg/tree-ssa/20030907-1.c, gcc.dg/tree-ssa/20030917-3.c, + gcc.dg/tree-ssa/20030922-1.c, gcc.dg/tree-ssa/20031113-1.c, + gcc.dg/tree-ssa/20040121-1.c, gcc.dg/tree-ssa/20040319-1.c, + gcc.dg/tree-ssa/20040324-1.c, gcc.dg/tree-ssa/20040326-1.c, + gcc.dg/tree-ssa/20040326-2.c, gcc.dg/tree-ssa/20040517-1.c, + gcc.dg/tree-ssa/ssa-ccp-10.c, gcc.dg/tree-ssa/ssa-pre-1.c, + gcc.dg/tree-ssa/tailcall-1.c, gcc.dg/tree-ssa/tailrecursion-5.c, + gcc.dg/ultrasp3.c, gcc.dg/winline-7.c, gcc.misc-tests/bprob-1.c, + gcc.misc-tests/bprob-2.c, gcc.misc-tests/gcov-3.c, + gcc.misc-tests/gcov-4.c, gcc.misc-tests/gcov-4b.c, + gcc.misc-tests/gcov-6.c, gcc.misc-tests/gcov-7.c, + gcc.misc-tests/i386-pf-3dnow-1.c, + gcc.misc-tests/i386-pf-athlon-1.c, + gcc.misc-tests/i386-pf-none-1.c, gcc.misc-tests/i386-pf-sse-1.c, + objc.dg/nested-func-1.m, objc.dg/special/unclaimed-category-1.m: + Declare built-in functions used. + * gcc.dg/torture/builtin-attr-1.c (nexttoward): Use FPTEST2ARG2. + 2004-08-02 Mark Mitchell PR c++/16707 diff --git a/gcc/testsuite/gcc.dg/20001023-1.c b/gcc/testsuite/gcc.dg/20001023-1.c index ce5e532ea6c..10cb2725939 100644 --- a/gcc/testsuite/gcc.dg/20001023-1.c +++ b/gcc/testsuite/gcc.dg/20001023-1.c @@ -1,6 +1,9 @@ /* { dg-do run } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ +extern void abort (void); +extern void exit (int); + unsigned char a[256], b[256], c[256], d[256]; void foo(unsigned char *x, int y, unsigned char *z) diff --git a/gcc/testsuite/gcc.dg/20001108-1.c b/gcc/testsuite/gcc.dg/20001108-1.c index a21d5b0f98f..682257fdb09 100644 --- a/gcc/testsuite/gcc.dg/20001108-1.c +++ b/gcc/testsuite/gcc.dg/20001108-1.c @@ -1,6 +1,9 @@ /* { dg-do run } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ +extern void abort (void); +extern void exit (int); + void die (long) __attribute__ ((noreturn)); void die (long e) diff --git a/gcc/testsuite/gcc.dg/20001117-1.c b/gcc/testsuite/gcc.dg/20001117-1.c index a16a62c38c7..8eb7f58b6bf 100644 --- a/gcc/testsuite/gcc.dg/20001117-1.c +++ b/gcc/testsuite/gcc.dg/20001117-1.c @@ -1,6 +1,9 @@ /* { dg-do run } */ /* { dg-options "-O2 -finstrument-functions" } */ +extern void abort (void); +extern void exit (int); + double foo (double a, double b) { diff --git a/gcc/testsuite/gcc.dg/20010202-1.c b/gcc/testsuite/gcc.dg/20010202-1.c index e4eaae0b246..f600373b8a3 100644 --- a/gcc/testsuite/gcc.dg/20010202-1.c +++ b/gcc/testsuite/gcc.dg/20010202-1.c @@ -1,6 +1,9 @@ /* { dg-do compile { target i?86-*-* sparc*-*-* } } */ /* { dg-options "-O2" } */ +extern void abort (void); +extern void exit (int); + typedef enum { false, true } __attribute__ ((packed)) boolean; typedef struct { enum { diff --git a/gcc/testsuite/gcc.dg/20011008-2.c b/gcc/testsuite/gcc.dg/20011008-2.c index 5937bcb0e82..01ff172b4ff 100644 --- a/gcc/testsuite/gcc.dg/20011008-2.c +++ b/gcc/testsuite/gcc.dg/20011008-2.c @@ -1,6 +1,9 @@ /* { dg-do run } */ /* { dg-options "-O0" } */ +extern void abort (void); +extern void exit (int); + struct { union {int x; int y;}; int q; } b; union { struct {int x;}; int q; } e; diff --git a/gcc/testsuite/gcc.dg/20011214-1.c b/gcc/testsuite/gcc.dg/20011214-1.c index 9dea9048c5a..dd05798fabf 100644 --- a/gcc/testsuite/gcc.dg/20011214-1.c +++ b/gcc/testsuite/gcc.dg/20011214-1.c @@ -1,5 +1,8 @@ /* { dg-do run } */ +extern void abort (void); +extern void exit (int); + #define small __attribute__((mode(QI))) int int main() { diff --git a/gcc/testsuite/gcc.dg/20020201-1.c b/gcc/testsuite/gcc.dg/20020201-1.c index 11326378a0a..d187a66fb00 100644 --- a/gcc/testsuite/gcc.dg/20020201-1.c +++ b/gcc/testsuite/gcc.dg/20020201-1.c @@ -7,6 +7,9 @@ /* { dg-options "-fprofile-arcs" } */ /* { dg-do run { target native } } */ +extern void abort (void); +extern void exit (int); + int rand (void); void srand (unsigned int seed); diff --git a/gcc/testsuite/gcc.dg/20020312-2.c b/gcc/testsuite/gcc.dg/20020312-2.c index 6e59cd6cf6f..322c1d04898 100644 --- a/gcc/testsuite/gcc.dg/20020312-2.c +++ b/gcc/testsuite/gcc.dg/20020312-2.c @@ -8,6 +8,8 @@ /* { dg-do run } */ /* { dg-options "-O -fno-pic" } */ +extern void abort (void); + #if defined(__alpha__) /* PIC register is $29, but is used even without -fpic. */ #elif defined(__arc__) diff --git a/gcc/testsuite/gcc.dg/20020426-2.c b/gcc/testsuite/gcc.dg/20020426-2.c index 56a478f0f7d..e38214cd9cf 100644 --- a/gcc/testsuite/gcc.dg/20020426-2.c +++ b/gcc/testsuite/gcc.dg/20020426-2.c @@ -4,6 +4,8 @@ /* { dg-options "-O2" } */ /* { dg-options "-O2 -frename-registers -fomit-frame-pointer -fPIC -mtune=i686" { target i?86-*-* } } */ +extern void exit (int); + typedef struct { union diff --git a/gcc/testsuite/gcc.dg/20030331-2.c b/gcc/testsuite/gcc.dg/20030331-2.c index 210524da456..0509d8aad87 100644 --- a/gcc/testsuite/gcc.dg/20030331-2.c +++ b/gcc/testsuite/gcc.dg/20030331-2.c @@ -1,5 +1,7 @@ // { dg-options "" } +extern int printf (const char *, ...); + int foo() { int yd; float in[1][yd]; diff --git a/gcc/testsuite/gcc.dg/20030612-1.c b/gcc/testsuite/gcc.dg/20030612-1.c index 2c4a8d3e7e0..f0875124385 100644 --- a/gcc/testsuite/gcc.dg/20030612-1.c +++ b/gcc/testsuite/gcc.dg/20030612-1.c @@ -1,6 +1,8 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +extern void abort (void); + int A, B; void foo() diff --git a/gcc/testsuite/gcc.dg/20030926-1.c b/gcc/testsuite/gcc.dg/20030926-1.c index 39833a65171..806dea76165 100644 --- a/gcc/testsuite/gcc.dg/20030926-1.c +++ b/gcc/testsuite/gcc.dg/20030926-1.c @@ -3,6 +3,9 @@ /* { dg-options "-O2 -minline-all-stringops" } */ /* { dg-options "-O2 -minline-all-stringops -march=pentium4" { target i?86-*-* } } */ +extern void *memcpy (void *, const void *, __SIZE_TYPE__); +extern __SIZE_TYPE__ strlen (const char *); + void foo (char *p) { diff --git a/gcc/testsuite/gcc.dg/20031216-1.c b/gcc/testsuite/gcc.dg/20031216-1.c index d8ee0703d7f..7c706d86bea 100644 --- a/gcc/testsuite/gcc.dg/20031216-1.c +++ b/gcc/testsuite/gcc.dg/20031216-1.c @@ -4,6 +4,8 @@ /* { dg-options "-O2" } */ /* { dg-options "-O2 -fPIC" { target s390*-*-* } } */ +extern void abort (void); + int count = 0; char *str; diff --git a/gcc/testsuite/gcc.dg/20031218-3.c b/gcc/testsuite/gcc.dg/20031218-3.c index 58878b61f06..0bae456b8e7 100644 --- a/gcc/testsuite/gcc.dg/20031218-3.c +++ b/gcc/testsuite/gcc.dg/20031218-3.c @@ -5,6 +5,8 @@ /* { dg-do compile } */ /* { dg-options "-O2 -g" } */ +extern __SIZE_TYPE__ strlen (const char *); + int x (char *s) { int y () { return (strlen (s)); } diff --git a/gcc/testsuite/gcc.dg/20040305-2.c b/gcc/testsuite/gcc.dg/20040305-2.c index b0423a25495..ffaf353e371 100644 --- a/gcc/testsuite/gcc.dg/20040305-2.c +++ b/gcc/testsuite/gcc.dg/20040305-2.c @@ -1,6 +1,8 @@ /* PR target/14262 */ /* { dg-do run } */ +extern void abort (void); + typedef char ACS; typedef char LSM; typedef char PANEL; diff --git a/gcc/testsuite/gcc.dg/980226-1.c b/gcc/testsuite/gcc.dg/980226-1.c index f66e9e2a9f7..f9d915f22d4 100644 --- a/gcc/testsuite/gcc.dg/980226-1.c +++ b/gcc/testsuite/gcc.dg/980226-1.c @@ -1,6 +1,7 @@ /* { dg-do compile { target i?86-*-* } } */ /* { dg-options -O2 } */ +extern int printf (const char *, ...); extern double bar (double); int diff --git a/gcc/testsuite/gcc.dg/Wreturn-type2.c b/gcc/testsuite/gcc.dg/Wreturn-type2.c index d57a9146517..781414a1ae0 100644 --- a/gcc/testsuite/gcc.dg/Wreturn-type2.c +++ b/gcc/testsuite/gcc.dg/Wreturn-type2.c @@ -2,6 +2,8 @@ missing return. */ /* { dg-do compile } */ +extern void abort (void); + f() {} /* { dg-bogus "" "no return warning" } */ int g() { abort (); } /* { dg-bogus "" "no return warning" } */ int main() {} /* { dg-bogus "" "no return warning" } */ diff --git a/gcc/testsuite/gcc.dg/Wunreachable-6.c b/gcc/testsuite/gcc.dg/Wunreachable-6.c index 77b6228fc86..6aac7aab205 100644 --- a/gcc/testsuite/gcc.dg/Wunreachable-6.c +++ b/gcc/testsuite/gcc.dg/Wunreachable-6.c @@ -2,6 +2,9 @@ /* { dg-do compile } */ /* { dg-options "-Wunreachable-code" } */ +extern int printf (const char *, ...); +extern void exit (int); + int main(int argc, char *argv[]) { if (argc != 1) diff --git a/gcc/testsuite/gcc.dg/Wunreachable-7.c b/gcc/testsuite/gcc.dg/Wunreachable-7.c index a19c94a1760..9a4d411be22 100644 --- a/gcc/testsuite/gcc.dg/Wunreachable-7.c +++ b/gcc/testsuite/gcc.dg/Wunreachable-7.c @@ -2,6 +2,9 @@ /* { dg-do compile } */ /* { dg-options "-O2 -Wunreachable-code" } */ +extern int printf (const char *, ...); +extern void exit (int); + int main(int argc, char *argv[]) { if (argc != 1) diff --git a/gcc/testsuite/gcc.dg/align-1.c b/gcc/testsuite/gcc.dg/align-1.c index 302d7d777a1..187eb5271d2 100644 --- a/gcc/testsuite/gcc.dg/align-1.c +++ b/gcc/testsuite/gcc.dg/align-1.c @@ -6,6 +6,8 @@ { dg-options "" } */ +extern void abort (void); + struct A { char c; diff --git a/gcc/testsuite/gcc.dg/builtin-prefetch-1.c b/gcc/testsuite/gcc.dg/builtin-prefetch-1.c index d547cfcd9e2..4e30275fde5 100644 --- a/gcc/testsuite/gcc.dg/builtin-prefetch-1.c +++ b/gcc/testsuite/gcc.dg/builtin-prefetch-1.c @@ -5,6 +5,8 @@ /* { dg-do run } */ +extern void exit (int); + enum locality { none, low, moderate, high, bogus }; enum rw { read, write }; diff --git a/gcc/testsuite/gcc.dg/builtins-17.c b/gcc/testsuite/gcc.dg/builtins-17.c index f33512cb916..a9e21fba8a3 100644 --- a/gcc/testsuite/gcc.dg/builtins-17.c +++ b/gcc/testsuite/gcc.dg/builtins-17.c @@ -11,7 +11,7 @@ extern void link_error(void); extern double exp(double); - +extern double atan(double); int main() { diff --git a/gcc/testsuite/gcc.dg/builtins-19.c b/gcc/testsuite/gcc.dg/builtins-19.c index a691f5eb97d..f0583a9783b 100644 --- a/gcc/testsuite/gcc.dg/builtins-19.c +++ b/gcc/testsuite/gcc.dg/builtins-19.c @@ -10,6 +10,9 @@ double cabs (__complex__ double); float cabsf (__complex__ float); long double cabsl (__complex__ long double); +double fabs (double); +float fabsf (float); +long double fabsl (long double); void link_error (void); diff --git a/gcc/testsuite/gcc.dg/builtins-2.c b/gcc/testsuite/gcc.dg/builtins-2.c index e3d652259b6..b1f31c84aa5 100644 --- a/gcc/testsuite/gcc.dg/builtins-2.c +++ b/gcc/testsuite/gcc.dg/builtins-2.c @@ -8,6 +8,28 @@ /* { dg-do compile } */ /* { dg-options "-O2 -ffast-math" } */ +extern double atan (double); +extern float atanf (float); +extern long double atanl (long double); +extern double exp (double); +extern float expf (float); +extern long double expl (long double); +extern double fabs (double); +extern float fabsf (float); +extern long double fabsl (long double); +extern double log (double); +extern float logf (float); +extern long double logl (long double); +extern double pow (double, double); +extern float powf (float, float); +extern long double powl (long double, long double); +extern double sqrt (double); +extern float sqrtf (float); +extern long double sqrtl (long double); +extern double tan (double); +extern float tanf (float); +extern long double tanl (long double); + double test1(double x) { return log(exp(x)); diff --git a/gcc/testsuite/gcc.dg/builtins-20.c b/gcc/testsuite/gcc.dg/builtins-20.c index 1bd95344ae9..fb7dd95c84b 100644 --- a/gcc/testsuite/gcc.dg/builtins-20.c +++ b/gcc/testsuite/gcc.dg/builtins-20.c @@ -10,6 +10,16 @@ #include "builtins-config.h" +extern double cos (double); +extern double sin (double); +extern double tan (double); +extern float cosf (float); +extern float sinf (float); +extern float tanf (float); +extern long double cosl (long double); +extern long double sinl (long double); +extern long double tanl (long double); + extern void link_error(void); void test1(double x) diff --git a/gcc/testsuite/gcc.dg/builtins-21.c b/gcc/testsuite/gcc.dg/builtins-21.c index 38d0c4f3114..60b127fe61b 100644 --- a/gcc/testsuite/gcc.dg/builtins-21.c +++ b/gcc/testsuite/gcc.dg/builtins-21.c @@ -8,6 +8,16 @@ /* { dg-do compile } */ /* { dg-options "-O2 -ffast-math" } */ +extern double fabs (double); +extern float fabsf (float); +extern long double fabsl (long double); +extern double sqrt (double); +extern float sqrtf (float); +extern long double sqrtl (long double); +extern double exp (double); +extern float expf (float); +extern long double expl (long double); + double test1(double x) { return fabs(x*x); diff --git a/gcc/testsuite/gcc.dg/builtins-7.c b/gcc/testsuite/gcc.dg/builtins-7.c index 87995a4d3a0..13e708e2997 100644 --- a/gcc/testsuite/gcc.dg/builtins-7.c +++ b/gcc/testsuite/gcc.dg/builtins-7.c @@ -8,6 +8,16 @@ /* { dg-do link } */ /* { dg-options "-O2 -ffast-math" } */ +extern double pow (double, double); +extern float powf (float, float); +extern long double powl (long double, long double); +extern double tan (double); +extern float tanf (float); +extern long double tanl (long double); +extern double atan (double); +extern float atanf (float); +extern long double atanl (long double); + extern void link_error(void); void test(double x) diff --git a/gcc/testsuite/gcc.dg/builtins-8.c b/gcc/testsuite/gcc.dg/builtins-8.c index 99d1a70d01a..c3066b41cab 100644 --- a/gcc/testsuite/gcc.dg/builtins-8.c +++ b/gcc/testsuite/gcc.dg/builtins-8.c @@ -9,6 +9,8 @@ /* { dg-options "-O2 -ffast-math" } */ extern void abort(void); +extern double pow(double, double); +extern double sqrt(double); void test(double x) { diff --git a/gcc/testsuite/gcc.dg/cpp/19930510-1.c b/gcc/testsuite/gcc.dg/cpp/19930510-1.c index 724640a85f7..62c1206745a 100644 --- a/gcc/testsuite/gcc.dg/cpp/19930510-1.c +++ b/gcc/testsuite/gcc.dg/cpp/19930510-1.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ +extern void exit (int); + #define ugly 3 #ugly "foobar" 3 /* { dg-error "invalid" "invalid directive" } */ int main() { exit (0); } diff --git a/gcc/testsuite/gcc.dg/cpp/charconst-3.c b/gcc/testsuite/gcc.dg/cpp/charconst-3.c index 9d7d2399812..7c196639131 100644 --- a/gcc/testsuite/gcc.dg/cpp/charconst-3.c +++ b/gcc/testsuite/gcc.dg/cpp/charconst-3.c @@ -9,6 +9,8 @@ #include +extern void abort (void); + int main () { /* These tests require at least 2-byte ints. 8-) */ diff --git a/gcc/testsuite/gcc.dg/cpp/charconst-4.c b/gcc/testsuite/gcc.dg/cpp/charconst-4.c index 986ea80f57e..aae33d35eef 100644 --- a/gcc/testsuite/gcc.dg/cpp/charconst-4.c +++ b/gcc/testsuite/gcc.dg/cpp/charconst-4.c @@ -13,6 +13,8 @@ #include +extern void abort (void); + #if INT_MAX == 32767 # define LONG_CHARCONST '!\234a' # define SHORT_CHARCONST '\234a' diff --git a/gcc/testsuite/gcc.dg/cpp/mi6.c b/gcc/testsuite/gcc.dg/cpp/mi6.c index aa1c8ed2ec5..c3af2d3f237 100644 --- a/gcc/testsuite/gcc.dg/cpp/mi6.c +++ b/gcc/testsuite/gcc.dg/cpp/mi6.c @@ -5,6 +5,8 @@ /* { dg-do compile } */ /* { dg-options "" } */ +extern void abort (void); + /* Each include file should not be subject to MI optimisation, since macro definitions can change. Each header increments the variable VAR if it is defined. diff --git a/gcc/testsuite/gcc.dg/cpp/tr-paste.c b/gcc/testsuite/gcc.dg/cpp/tr-paste.c index e884e83c8d5..1dd82766317 100644 --- a/gcc/testsuite/gcc.dg/cpp/tr-paste.c +++ b/gcc/testsuite/gcc.dg/cpp/tr-paste.c @@ -5,6 +5,8 @@ /* { dg-do compile } */ /* { dg-options "-traditional-cpp" } */ +extern int printf (const char *, ...); + #define A(name) X/**/name #define B(name) \ diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi6.c b/gcc/testsuite/gcc.dg/cpp/trad/mi6.c index aa1c8ed2ec5..c3af2d3f237 100644 --- a/gcc/testsuite/gcc.dg/cpp/trad/mi6.c +++ b/gcc/testsuite/gcc.dg/cpp/trad/mi6.c @@ -5,6 +5,8 @@ /* { dg-do compile } */ /* { dg-options "" } */ +extern void abort (void); + /* Each include file should not be subject to MI optimisation, since macro definitions can change. Each header increments the variable VAR if it is defined. diff --git a/gcc/testsuite/gcc.dg/cpp/trad/paste.c b/gcc/testsuite/gcc.dg/cpp/trad/paste.c index 9f1c0db3291..9b83fd30f4e 100644 --- a/gcc/testsuite/gcc.dg/cpp/trad/paste.c +++ b/gcc/testsuite/gcc.dg/cpp/trad/paste.c @@ -4,6 +4,8 @@ /* { dg-do compile } */ +extern int printf (const char *, ...); + #define A(name) X/**/name #define B(name) \ diff --git a/gcc/testsuite/gcc.dg/cpp/trad/strify.c b/gcc/testsuite/gcc.dg/cpp/trad/strify.c index 500ef1ea32f..d97a439709c 100644 --- a/gcc/testsuite/gcc.dg/cpp/trad/strify.c +++ b/gcc/testsuite/gcc.dg/cpp/trad/strify.c @@ -4,6 +4,7 @@ #define foo(a, b) c="a"; d="b"; extern void abort (); +extern void exit (int); int main () { diff --git a/gcc/testsuite/gcc.dg/fastmath-1.c b/gcc/testsuite/gcc.dg/fastmath-1.c index 1194a6f7d42..4efe4300467 100644 --- a/gcc/testsuite/gcc.dg/fastmath-1.c +++ b/gcc/testsuite/gcc.dg/fastmath-1.c @@ -1,6 +1,8 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math" } */ +extern void abort (void); + int foo ( float* dists, int k) { if ( ( dists [ 0 ] > 0 ) == ( dists [ 1 ] > 0 ) ) diff --git a/gcc/testsuite/gcc.dg/fshort-wchar.c b/gcc/testsuite/gcc.dg/fshort-wchar.c index 074e872358b..9f4946307f0 100644 --- a/gcc/testsuite/gcc.dg/fshort-wchar.c +++ b/gcc/testsuite/gcc.dg/fshort-wchar.c @@ -7,6 +7,8 @@ Test that __WCHAR_MAX__ is correct with -fshort-wchar. */ +extern void abort (void); + int main () { __WCHAR_TYPE__ w = ~(__WCHAR_TYPE__) 0; diff --git a/gcc/testsuite/gcc.dg/i386-387-7.c b/gcc/testsuite/gcc.dg/i386-387-7.c index 43c916c61d0..210917ad415 100644 --- a/gcc/testsuite/gcc.dg/i386-387-7.c +++ b/gcc/testsuite/gcc.dg/i386-387-7.c @@ -3,6 +3,9 @@ /* { dg-options "-O -ffast-math -march=i686" } */ /* { dg-final { scan-assembler "fsincos" } } */ +extern double sin (double); +extern double cos (double); + double f1(double x) { return sin(x) + cos (x); diff --git a/gcc/testsuite/gcc.dg/i386-387-8.c b/gcc/testsuite/gcc.dg/i386-387-8.c index 05787160b00..67c16d92c18 100644 --- a/gcc/testsuite/gcc.dg/i386-387-8.c +++ b/gcc/testsuite/gcc.dg/i386-387-8.c @@ -5,6 +5,8 @@ /* { dg-final { scan-assembler "fptan" } } */ /* { dg-final { scan-assembler-not "fld1" } } */ +extern double tan (double); + double f1(double x) { return 1.0 / tan(x); diff --git a/gcc/testsuite/gcc.dg/i386-asm-1.c b/gcc/testsuite/gcc.dg/i386-asm-1.c index bf7aa1d0c4b..826f5b6dbe3 100644 --- a/gcc/testsuite/gcc.dg/i386-asm-1.c +++ b/gcc/testsuite/gcc.dg/i386-asm-1.c @@ -2,6 +2,7 @@ /* { dg-do run { target i?86-*-* } } */ /* { dg-options "-O2" } */ +extern void abort (void); static int bar(int x) __asm__("bar") __attribute__((regparm(1))); static int __attribute__((regparm(1), noinline, used)) bar(int x) diff --git a/gcc/testsuite/gcc.dg/i386-cadd.c b/gcc/testsuite/gcc.dg/i386-cadd.c index ef6c16bee78..2c6360b946b 100644 --- a/gcc/testsuite/gcc.dg/i386-cadd.c +++ b/gcc/testsuite/gcc.dg/i386-cadd.c @@ -2,6 +2,8 @@ /* { dg-options "-O2 -march=k8" } */ /* { dg-final { scan-assembler "sbb" } } */ +extern void abort (void); + /* Conditional increment is best done using sbb $-1, val. */ int t[]={0,0,0,0,1,1,1,1,1,1}; q() diff --git a/gcc/testsuite/gcc.dg/i386-fpcvt-3.c b/gcc/testsuite/gcc.dg/i386-fpcvt-3.c index 69d7e3d2cd6..f47cd70ed9a 100644 --- a/gcc/testsuite/gcc.dg/i386-fpcvt-3.c +++ b/gcc/testsuite/gcc.dg/i386-fpcvt-3.c @@ -1,6 +1,7 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -msse2 -march=k8" } */ /* { dg-final { scan-assembler-not "cvtss2sd" } } */ +extern double fabs (double); float a,b; main() { diff --git a/gcc/testsuite/gcc.dg/i386-loop-3.c b/gcc/testsuite/gcc.dg/i386-loop-3.c index c1b4bcea5be..59ed5bf589f 100644 --- a/gcc/testsuite/gcc.dg/i386-loop-3.c +++ b/gcc/testsuite/gcc.dg/i386-loop-3.c @@ -4,6 +4,9 @@ /* { dg-do run { target i?86-*-* } } */ /* { dg-options "-mtune=k6 -O3 -ffast-math -funroll-loops" } */ +extern void *memset (void *, int, __SIZE_TYPE__); +extern void abort (void); + typedef struct { unsigned char colormod; diff --git a/gcc/testsuite/gcc.dg/i386-memset-1.c b/gcc/testsuite/gcc.dg/i386-memset-1.c index f450dd7287e..b87a05b8df7 100644 --- a/gcc/testsuite/gcc.dg/i386-memset-1.c +++ b/gcc/testsuite/gcc.dg/i386-memset-1.c @@ -10,6 +10,10 @@ /* { dg-do run { target "i?86-*-*" } } */ /* { dg-options "-O2 -minline-all-stringops" } */ +extern void *memset (void *, int, __SIZE_TYPE__); +extern void abort (void); +extern void exit (int); + #ifndef MAX_OFFSET #define MAX_OFFSET (sizeof (long long)) #endif diff --git a/gcc/testsuite/gcc.dg/loop-2.c b/gcc/testsuite/gcc.dg/loop-2.c index 8acc65d116f..fa96f89278c 100644 --- a/gcc/testsuite/gcc.dg/loop-2.c +++ b/gcc/testsuite/gcc.dg/loop-2.c @@ -3,6 +3,9 @@ 0 iterations of the loop rather than the correct 1. */ /* { dg-do run } */ +extern void abort (void); +extern void exit (int); + __inline__ int tag() { return 0; } void f (); diff --git a/gcc/testsuite/gcc.dg/nest.c b/gcc/testsuite/gcc.dg/nest.c index 264dde26f05..981baece34e 100644 --- a/gcc/testsuite/gcc.dg/nest.c +++ b/gcc/testsuite/gcc.dg/nest.c @@ -6,6 +6,8 @@ /* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */ /* { dg-error "-pg not supported" "Profiler support missing" { target *-*-sco3.2v5* } 0 } */ +extern void abort (void); + long foo (long x) { long i, sum = 0; diff --git a/gcc/testsuite/gcc.dg/noncompile/971104-1.c b/gcc/testsuite/gcc.dg/noncompile/971104-1.c index ed7cb523c3b..54337b209c9 100644 --- a/gcc/testsuite/gcc.dg/noncompile/971104-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/971104-1.c @@ -1,3 +1,4 @@ +extern int printf(const char *, ...); typedef unsigned short ushort; struct sembuf { ushort sem_num; diff --git a/gcc/testsuite/gcc.dg/noncompile/990416-1.c b/gcc/testsuite/gcc.dg/noncompile/990416-1.c index 6b69ead2fe1..72aa3cd131c 100644 --- a/gcc/testsuite/gcc.dg/noncompile/990416-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/990416-1.c @@ -1,3 +1,4 @@ +extern void *memcpy (void *, const void *, __SIZE_TYPE__); typedef int word_type; static void diff --git a/gcc/testsuite/gcc.dg/noncompile/scope.c b/gcc/testsuite/gcc.dg/noncompile/scope.c index 0bfc3f284db..7f09c27cffd 100644 --- a/gcc/testsuite/gcc.dg/noncompile/scope.c +++ b/gcc/testsuite/gcc.dg/noncompile/scope.c @@ -1,3 +1,5 @@ +extern void abort (void); +extern void exit (int); static int v = 3; f () diff --git a/gcc/testsuite/gcc.dg/pack-test-4.c b/gcc/testsuite/gcc.dg/pack-test-4.c index 27ae0cdcc77..60da6a07751 100644 --- a/gcc/testsuite/gcc.dg/pack-test-4.c +++ b/gcc/testsuite/gcc.dg/pack-test-4.c @@ -3,6 +3,8 @@ { dg-options "" } { dg-do run } */ +extern void abort (void); + typedef unsigned char uint8_t; typedef struct { diff --git a/gcc/testsuite/gcc.dg/pack-test-5.c b/gcc/testsuite/gcc.dg/pack-test-5.c index e95030c089e..7645043dd84 100644 --- a/gcc/testsuite/gcc.dg/pack-test-5.c +++ b/gcc/testsuite/gcc.dg/pack-test-5.c @@ -2,6 +2,8 @@ of a field. */ /* { dg-do run } */ +extern void abort (void); + struct A { double d; } __attribute__ ((aligned)); diff --git a/gcc/testsuite/gcc.dg/pch/inline-4.c b/gcc/testsuite/gcc.dg/pch/inline-4.c index e4db473f3cf..60e35aa6266 100644 --- a/gcc/testsuite/gcc.dg/pch/inline-4.c +++ b/gcc/testsuite/gcc.dg/pch/inline-4.c @@ -1,4 +1,5 @@ #include "inline-4.h" +extern int printf (const char *, ...); int main(void) { printf (getstring()); return 0; diff --git a/gcc/testsuite/gcc.dg/postincr-1.c b/gcc/testsuite/gcc.dg/postincr-1.c index 6aa203cb2ea..752cda40c22 100644 --- a/gcc/testsuite/gcc.dg/postincr-1.c +++ b/gcc/testsuite/gcc.dg/postincr-1.c @@ -1,6 +1,8 @@ /* Simple test for proper postincrement semantics. */ /* { dg-do run } */ +extern void abort (void); + int i; int c; int *f () diff --git a/gcc/testsuite/gcc.dg/pr10392-1.c b/gcc/testsuite/gcc.dg/pr10392-1.c index c71ec4d34b2..8d599b8af74 100644 --- a/gcc/testsuite/gcc.dg/pr10392-1.c +++ b/gcc/testsuite/gcc.dg/pr10392-1.c @@ -13,6 +13,7 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ /* { dg-options "-O2 -m4" { target sh4-*-* } } */ +extern void abort (void); const char *dont_optimize_function_away; const char *use(const char *str) diff --git a/gcc/testsuite/gcc.dg/pragma-align.c b/gcc/testsuite/gcc.dg/pragma-align.c index 5341870b6cb..73869327034 100644 --- a/gcc/testsuite/gcc.dg/pragma-align.c +++ b/gcc/testsuite/gcc.dg/pragma-align.c @@ -2,6 +2,8 @@ /* { dg-do run { target i?86-*-linux* i?86-*-*bsd* i?86-*-sco3.2v5* *-*-solaris2.* } } */ +extern void abort (void); + struct { char one; long two; diff --git a/gcc/testsuite/gcc.dg/profile-generate-1.c b/gcc/testsuite/gcc.dg/profile-generate-1.c index 64ebb0e3a5e..9c73e6c63e7 100644 --- a/gcc/testsuite/gcc.dg/profile-generate-1.c +++ b/gcc/testsuite/gcc.dg/profile-generate-1.c @@ -1,6 +1,8 @@ /* Bug 16325. */ /* { dg-options "-O -fprofile-generate" } */ +extern void abort (void); + int *p1; int *p2; int *p3; diff --git a/gcc/testsuite/gcc.dg/sibcall-1.c b/gcc/testsuite/gcc.dg/sibcall-1.c index f9b1f7899b4..4521ace9e15 100644 --- a/gcc/testsuite/gcc.dg/sibcall-1.c +++ b/gcc/testsuite/gcc.dg/sibcall-1.c @@ -11,6 +11,9 @@ marker. Self-recursion tail calls are optimized for all targets, regardless of presence of sibcall patterns. */ +extern void abort (void); +extern void exit (int); + extern void recurser_void (int); extern void track (int); diff --git a/gcc/testsuite/gcc.dg/sibcall-2.c b/gcc/testsuite/gcc.dg/sibcall-2.c index cb2d1d599c6..4c226c496e3 100644 --- a/gcc/testsuite/gcc.dg/sibcall-2.c +++ b/gcc/testsuite/gcc.dg/sibcall-2.c @@ -11,6 +11,9 @@ marker. Self-recursion tail calls are optimized for all targets, regardless of presence of sibcall patterns. */ +extern void abort (void); +extern void exit (int); + extern void recurser_void (void); extern void track (void); diff --git a/gcc/testsuite/gcc.dg/sibcall-3.c b/gcc/testsuite/gcc.dg/sibcall-3.c index 37637e70270..86bc8da38e5 100644 --- a/gcc/testsuite/gcc.dg/sibcall-3.c +++ b/gcc/testsuite/gcc.dg/sibcall-3.c @@ -13,6 +13,9 @@ (except targets where the test does not work due to the return address not saved on the regular stack). */ +extern void abort (void); +extern void exit (int); + static void recurser_void1 (int); static void recurser_void2 (int); extern void track (int); diff --git a/gcc/testsuite/gcc.dg/sibcall-4.c b/gcc/testsuite/gcc.dg/sibcall-4.c index 15d235c471f..bbb03735490 100644 --- a/gcc/testsuite/gcc.dg/sibcall-4.c +++ b/gcc/testsuite/gcc.dg/sibcall-4.c @@ -13,6 +13,9 @@ (except targets where the test does not work due to the return address not saved on the regular stack). */ +extern void abort (void); +extern void exit (int); + static void recurser_void1 (void); static void recurser_void2 (void); extern void track (void); diff --git a/gcc/testsuite/gcc.dg/sibcall-5.c b/gcc/testsuite/gcc.dg/sibcall-5.c index 424908dba5a..da95f13e25c 100644 --- a/gcc/testsuite/gcc.dg/sibcall-5.c +++ b/gcc/testsuite/gcc.dg/sibcall-5.c @@ -2,6 +2,8 @@ /* { dg-do run { target i?86-*-* } } */ /* { dg-options "-O2" } */ +extern void abort (void); + int (*f)(int, int) __attribute__((regparm(2))); int (*g)(int, int, int) __attribute__((regparm(3))); diff --git a/gcc/testsuite/gcc.dg/sibcall-6.c b/gcc/testsuite/gcc.dg/sibcall-6.c index 4b0d299f5b7..bb855108ee1 100644 --- a/gcc/testsuite/gcc.dg/sibcall-6.c +++ b/gcc/testsuite/gcc.dg/sibcall-6.c @@ -9,6 +9,9 @@ /* { dg-do run { target i?86-*-* s390*-*-* x86_64-*-*} } */ /* { dg-options "-O2 -foptimize-sibling-calls" } */ +extern void abort (void); +extern void exit (int); + int foo (int); int bar (int); diff --git a/gcc/testsuite/gcc.dg/switch-warn-1.c b/gcc/testsuite/gcc.dg/switch-warn-1.c index d98bfa892d6..04ca4e36765 100644 --- a/gcc/testsuite/gcc.dg/switch-warn-1.c +++ b/gcc/testsuite/gcc.dg/switch-warn-1.c @@ -1,6 +1,9 @@ /* { dg-do run } */ /* { dg-options "-O0" } */ +extern void abort (void); +extern void exit (int); + /* Check that out-of-bounds case warnings work in the case that the testing expression is promoted. */ int diff --git a/gcc/testsuite/gcc.dg/switch-warn-2.c b/gcc/testsuite/gcc.dg/switch-warn-2.c index ab742669163..7778b66e087 100644 --- a/gcc/testsuite/gcc.dg/switch-warn-2.c +++ b/gcc/testsuite/gcc.dg/switch-warn-2.c @@ -2,6 +2,9 @@ /* { dg-do run } */ /* { dg-options "-O0" } */ +extern void abort (void); +extern void exit (int); + int foo (unsigned int i) { diff --git a/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c b/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c index 304e92afa8f..62070c4e71c 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c @@ -26,9 +26,10 @@ void test_builtin_##FN(TYPE x, TYPE y) \ { if (__builtin_##FN(x,y) != __builtin_##FN(x,y)) link_failure_builtin_##FN(); } /* Also test the regular (non-__builtin_) function. */ -#define TEST1(FN, TYPE) \ +#define TEST1(FN, TYPE, RTYPE) \ BUILTIN_TEST1(FN, TYPE) \ extern void link_failure_##FN(void); \ +extern RTYPE FN(TYPE); \ void test_##FN(TYPE x) { if (FN(x) != FN(x)) link_failure_##FN(); } /* Test the __builtin_ functions taking void arguments (with the "f" @@ -153,12 +154,32 @@ void test_builtin_##FN##l(_Complex long double ld1, _Complex long double ld2) \ /* These macros additionally test the non-__builtin_ functions. */ /* Test the functions taking one FP argument (with the "f" and "l" - variants). */ + variants) and returning that type. */ #define FPTEST1(FN) \ BUILTIN_FPTEST1(FN) \ extern void link_failure_##FN(void); \ extern void link_failure_##FN##f(void); \ extern void link_failure_##FN##l(void); \ +extern double FN(double); \ +extern float FN##f(float); \ +extern long double FN##l(long double); \ +void test_##FN(double d) \ +{ if (FN(d) != FN(d)) link_failure_##FN(); } \ +void test_##FN##f(float f) \ +{ if (FN##f(f) != FN##f(f)) link_failure_##FN##f(); } \ +void test_##FN##l(long double ld) \ +{ if (FN##l(ld) != FN##l(ld)) link_failure_##FN##l(); } + +/* Test the functions taking one FP argument (with the "f" and "l" + variants) and returning TYPE. */ +#define FPTEST1T(FN, TYPE) \ +BUILTIN_FPTEST1(FN) \ +extern void link_failure_##FN(void); \ +extern void link_failure_##FN##f(void); \ +extern void link_failure_##FN##l(void); \ +extern TYPE FN(double); \ +extern TYPE FN##f(float); \ +extern TYPE FN##l(long double); \ void test_##FN(double d) \ { if (FN(d) != FN(d)) link_failure_##FN(); } \ void test_##FN##f(float f) \ @@ -173,6 +194,9 @@ BUILTIN_FPTEST2(FN) \ extern void link_failure_##FN(void); \ extern void link_failure_##FN##f(void); \ extern void link_failure_##FN##l(void); \ +extern double FN(double, double); \ +extern float FN##f(float, float); \ +extern long double FN##l(long double, long double); \ void test_##FN(double d1, double d2) \ { if (FN(d1,d2) != FN(d1,d2)) link_failure_##FN(); } \ void test_##FN##f(float f1, float f2) \ @@ -188,6 +212,9 @@ BUILTIN_FPTEST2ARG1(FN, TYPE) \ extern void link_failure_##FN(void); \ extern void link_failure_##FN##f(void); \ extern void link_failure_##FN##l(void); \ +extern double FN(TYPE, double); \ +extern float FN##f(TYPE, float); \ +extern long double FN##l(TYPE, long double); \ void test_##FN(TYPE x, double d) \ { if (FN(x,d) != FN(x,d)) link_failure_##FN(); } \ void test_##FN##f(TYPE x, float f) \ @@ -203,6 +230,9 @@ BUILTIN_FPTEST2ARG2(FN, TYPE) \ extern void link_failure_##FN(void); \ extern void link_failure_##FN##f(void); \ extern void link_failure_##FN##l(void); \ +extern double FN(double, TYPE); \ +extern float FN##f(float, TYPE); \ +extern long double FN##l(long double, TYPE); \ void test_##FN(double d, TYPE x) \ { if (FN(d,x) != FN(d,x)) link_failure_##FN(); } \ void test_##FN##f(float f, TYPE x) \ @@ -217,6 +247,9 @@ BUILTIN_FPTEST3(FN) \ extern void link_failure_##FN(void); \ extern void link_failure_##FN##f(void); \ extern void link_failure_##FN##l(void); \ +extern double FN(double, double, double); \ +extern float FN##f(float, float, float); \ +extern long double FN##l(long double, long double, long double); \ void test_##FN(double d1, double d2, double d3) \ { if (FN(d1,d2,d3) != FN(d1,d2,d3)) link_failure_##FN(); } \ void test_##FN##f(float f1, float f2, float f3) \ @@ -225,12 +258,32 @@ void test_##FN##l(long double ld1, long double ld2, long double ld3) \ { if (FN##l(ld1,ld2,ld3) != FN##l(ld1,ld2,ld3)) link_failure_##FN##l(); } /* Test the functions taking one complex argument (with the "f" and - "l" variants). */ + "l" variants) and returning that type. */ #define CPTEST1(FN) \ BUILTIN_CPTEST1(FN) \ extern void link_failure_##FN(void); \ extern void link_failure_##FN##f(void); \ extern void link_failure_##FN##l(void); \ +extern _Complex double FN(_Complex double); \ +extern _Complex float FN##f(_Complex float); \ +extern _Complex long double FN##l(_Complex long double); \ +void test_##FN(_Complex double d) \ +{ if (FN(d) != FN(d)) link_failure_##FN(); } \ +void test_##FN##f(_Complex float f) \ +{ if (FN##f(f) != FN##f(f)) link_failure_##FN##f(); } \ +void test_##FN##l(_Complex long double ld) \ +{ if (FN##l(ld) != FN##l(ld)) link_failure_##FN##l(); } + +/* Test the functions taking one complex argument (with the "f" and + "l" variants) and returning the real type. */ +#define CPTEST1R(FN) \ +BUILTIN_CPTEST1(FN) \ +extern void link_failure_##FN(void); \ +extern void link_failure_##FN##f(void); \ +extern void link_failure_##FN##l(void); \ +extern double FN(_Complex double); \ +extern float FN##f(_Complex float); \ +extern long double FN##l(_Complex long double); \ void test_##FN(_Complex double d) \ { if (FN(d) != FN(d)) link_failure_##FN(); } \ void test_##FN##f(_Complex float f) \ @@ -245,6 +298,9 @@ BUILTIN_CPTEST2(FN) \ extern void link_failure_##FN(void); \ extern void link_failure_##FN##f(void); \ extern void link_failure_##FN##l(void); \ +extern _Complex double FN(_Complex double, _Complex double); \ +extern _Complex float FN##f(_Complex float, _Complex float); \ +extern _Complex long double FN##l(_Complex long double, _Complex long double); \ void test_##FN(_Complex double d1, _Complex double d2) \ { if (FN(d1,d2) != FN(d1,d2)) link_failure_##FN(); } \ void test_##FN##f(_Complex float f1, _Complex float f2) \ @@ -283,27 +339,27 @@ FPTEST2 (fmod) FPTEST1 (gamma) BUILTIN_FPTEST0 (huge_val) FPTEST2 (hypot) -FPTEST1 (ilogb) +FPTEST1T (ilogb, int) BUILTIN_FPTEST0 (inf) FPTEST1 (j0) FPTEST1 (j1) FPTEST2ARG1 (jn, int) FPTEST2ARG2 (ldexp, int) FPTEST1 (lgamma) -FPTEST1 (llrint) -FPTEST1 (llround) +FPTEST1T (llrint, long long) +FPTEST1T (llround, long long) FPTEST1 (log) FPTEST1 (log10) FPTEST1 (log1p) FPTEST1 (log2) FPTEST1 (logb) -FPTEST1 (lrint) -FPTEST1 (lround) +FPTEST1T (lrint, long) +FPTEST1T (lround, long) BUILTIN_FPTEST1ARG (nan, char *) BUILTIN_FPTEST1ARG (nans, char *) FPTEST1 (nearbyint) FPTEST2 (nextafter) -FPTEST2 (nexttoward) +FPTEST2ARG2 (nexttoward, long double) FPTEST2 (pow) FPTEST1 (pow10) FPTEST2 (remainder) @@ -328,7 +384,7 @@ FPTEST2ARG1 (yn, int) /*CPTEST1 (cabs) See http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00040.html */ CPTEST1 (cacos) CPTEST1 (cacosh) -CPTEST1 (carg) +CPTEST1R (carg) CPTEST1 (casin) CPTEST1 (casinh) CPTEST1 (catan) @@ -336,32 +392,43 @@ CPTEST1 (catanh) CPTEST1 (ccos) CPTEST1 (ccosh) CPTEST1 (cexp) -CPTEST1 (cimag) +CPTEST1R (cimag) /*CPTEST1 (clog)*/ CPTEST1 (conj) CPTEST2 (cpow) CPTEST1 (cproj) -CPTEST1 (creal) +CPTEST1R (creal) CPTEST1 (csin) CPTEST1 (csinh) CPTEST1 (csqrt) CPTEST1 (ctan) CPTEST1 (ctanh) +/* These next definitions are kludges. When GCC has a it + should be used. +*/ +#if __INT_MAX__ == __LONG_LONG_MAX__ +typedef int intmax_t; +#elif __LONG_MAX__ == __LONG_LONG_MAX__ +typedef long intmax_t; +#else +typedef long long intmax_t; +#endif + /* Various other const builtins. */ -TEST1 (abs, int) +TEST1 (abs, int, int) BUILTIN_TEST1 (clz, int) BUILTIN_TEST1 (clzl, long) BUILTIN_TEST1 (clzll, long long) BUILTIN_TEST1 (ctz, int) BUILTIN_TEST1 (ctzl, long) BUILTIN_TEST1 (ctzll, long long) -TEST1 (ffs, int) -TEST1 (ffsl, long) -TEST1 (ffsll, long long) -TEST1 (imaxabs, int) -TEST1 (labs, long) -TEST1 (llabs, long long) +TEST1 (ffs, int, int) +TEST1 (ffsl, long, int) +TEST1 (ffsll, long long, int) +TEST1 (imaxabs, intmax_t, intmax_t) +TEST1 (labs, long, long) +TEST1 (llabs, long long, long long) BUILTIN_TEST1 (parity, int) BUILTIN_TEST1 (parityl, long) BUILTIN_TEST1 (parityll, long long) diff --git a/gcc/testsuite/gcc.dg/torture/builtin-math-1.c b/gcc/testsuite/gcc.dg/torture/builtin-math-1.c index 99fef8d7825..d052f5347bc 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-math-1.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-math-1.c @@ -7,6 +7,34 @@ /* { dg-do link } */ +extern double atan (double); +extern float atanf (float); +extern long double atanl (long double); +extern double cbrt (double); +extern float cbrtf (float); +extern long double cbrtl (long double); +extern double cos (double); +extern float cosf (float); +extern long double cosl (long double); +extern double exp (double); +extern float expf (float); +extern long double expl (long double); +extern double log (double); +extern float logf (float); +extern long double logl (long double); +extern double pow (double, double); +extern float powf (float, float); +extern long double powl (long double, long double); +extern double sin (double); +extern float sinf (float); +extern long double sinl (long double); +extern double sqrt (double); +extern float sqrtf (float); +extern long double sqrtl (long double); +extern double tan (double); +extern float tanf (float); +extern long double tanl (long double); + /* All references to link_error should go away at compile-time. */ extern void link_error(void); diff --git a/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c b/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c index d49de7f66de..c8c8609f62c 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c @@ -15,6 +15,7 @@ int main (void) { volatile int i = 0; + extern void exit (int); if (i) tabort (); if (i) @@ -60,6 +61,7 @@ t_exit (void) void _exit (int i) { + extern void abort (void); abort (); } @@ -81,5 +83,6 @@ t_Exit (void) void _Exit (int i) { + extern void abort (void); abort (); } diff --git a/gcc/testsuite/gcc.dg/trampoline-1.c b/gcc/testsuite/gcc.dg/trampoline-1.c index dbbd8509bff..88078621066 100644 --- a/gcc/testsuite/gcc.dg/trampoline-1.c +++ b/gcc/testsuite/gcc.dg/trampoline-1.c @@ -8,6 +8,7 @@ trampoline couldn't be made executable. */ extern void abort(void); +extern double fabs(double); void foo (void) { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030703-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030703-1.c index f5b3db3460d..44cf3d2b0e9 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030703-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030703-1.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ - +extern void abort (void); extern int blah[]; foo(int index) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c index a73150a06a3..d1251c103a2 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c @@ -1,6 +1,8 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ - + +extern void abort (void); + union tree_node; typedef union tree_node *tree; extern const char tree_code_type[]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030708-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030708-1.c index 65c8026a341..717c8affd73 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030708-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030708-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); struct rtx_def; typedef struct rtx_def *rtx; enum rtx_code diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c b/gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c index 98681c088c9..2bc21cae70b 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); union tree_node; typedef union tree_node *tree; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c index 53e3d5992cf..4b1d18120e1 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); union tree_node; typedef union tree_node *tree; struct tree_vec diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c index eba207a25e5..a1ef017dfda 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); union tree_node; typedef union tree_node *tree; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030729-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030729-1.c index b4b1a819ff4..8ac20d5c614 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030729-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030729-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); union tree_node; typedef union tree_node *tree; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030730-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030730-1.c index 643b5e79271..3dd95eabbcd 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030730-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030730-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-dom3" } */ +extern void exit (int); extern void *ggc_alloc (__SIZE_TYPE__); typedef struct dw_attr_struct *dw_attr_ref; typedef struct dw_attr_struct diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030730-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030730-2.c index 06b5710f65f..7fd0c181945 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030730-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030730-2.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-dom3" } */ +extern void exit (int); extern void *ggc_alloc (__SIZE_TYPE__); typedef struct dw_attr_struct *dw_attr_ref; typedef struct dw_attr_struct diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030731-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030731-1.c index 82634da1c5b..c622c98dcf1 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030731-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030731-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); struct rtx_def; typedef struct rtx_def *rtx; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-11.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-11.c index 6296346095d..6df4702c70c 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-11.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-11.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); struct rtx_def; typedef struct rtx_def *rtx; struct rtx_def diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c index e9837d38814..cd518eba914 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); oof () { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-5.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-5.c index b530c841a7f..49f3a997d50 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-5.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-5.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ - + +extern void abort (void); struct rtx_def; typedef struct rtx_def *rtx; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c index 7f31578307a..f1e0d00c235 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-dom3" } */ - +extern void abort (void); union tree_node; typedef union tree_node *tree; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030808-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030808-1.c index 08f8f15f706..11781f9d387 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030808-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030808-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-cddce" } */ +extern void abort (void); struct rtx_def; typedef struct rtx_def *rtx; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030814-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030814-1.c index d165b19bfda..da48d2255a4 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030814-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030814-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); com(int *blah) { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030814-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030814-2.c index a3f2ae6b70b..5acc6e1dbb8 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030814-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030814-2.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); void foo (int value) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030814-3.c b/gcc/testsuite/gcc.dg/tree-ssa/20030814-3.c index 2058c0c987a..bcebd075d6f 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030814-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030814-3.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); void foo (int value) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c b/gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c index 81711dd75cd..7bdaaebed62 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3 -fdump-tree-optimized" } */ +extern void abort (void); union tree_node; typedef union tree_node *tree; extern const char tree_code_type[]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c b/gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c index bab21a3cae8..c34c2dc8bbf 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3 -fdump-tree-optimized" } */ +extern void abort (void); union tree_node; typedef union tree_node *tree; extern const char tree_code_type[]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030814-6.c b/gcc/testsuite/gcc.dg/tree-ssa/20030814-6.c index c16fda9155c..49b526ccc13 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030814-6.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030814-6.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); union tree_node; typedef union tree_node *tree; enum tree_code diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030814-7.c b/gcc/testsuite/gcc.dg/tree-ssa/20030814-7.c index cbefbb33c1a..440794d6ae3 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030814-7.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030814-7.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); struct rtx_def; typedef struct rtx_def *rtx; struct rtvec_def; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030815-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030815-1.c index 13a4917e912..ba0cf6b16a0 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030815-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030815-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); typedef unsigned int size_t; struct rtx_def; typedef struct rtx_def *rtx; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030907-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030907-1.c index 3bc5557cf00..6fb37c34349 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030907-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030907-1.c @@ -6,6 +6,9 @@ /* { dg-do compile } */ /* { dg-options "-O -fdump-tree-optimized" } */ +extern void abort (void); +extern void exit (int); + int main() { int i; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030917-3.c b/gcc/testsuite/gcc.dg/tree-ssa/20030917-3.c index f7fabe5008c..478933b3f48 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030917-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030917-3.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fno-tree-dominator-opts -fdump-tree-ccp" } */ - + +extern int printf (const char *, ...); main () { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030922-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030922-1.c index 8876071c81f..f216125eae1 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030922-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030922-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-dom3" } */ +extern void abort (void); union tree_node; typedef union tree_node *tree; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20031113-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20031113-1.c index a114379a7ad..865915f4fb3 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20031113-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20031113-1.c @@ -7,6 +7,8 @@ /* { dg-do compile } */ /* { dg-options "-O1" } */ +extern __SIZE_TYPE__ strlen (const char *); + int i; static void diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040121-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040121-1.c index 6987e17d907..6225bcdc8a3 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20040121-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040121-1.c @@ -4,6 +4,7 @@ not boolean */ /* { dg-options "-O3" } */ /* { dg-do run } */ +extern void abort (void); char *foo(char *p, char *q) { int x = (p !=0) + (q != 0); if (x==2) return "a"; else return 0; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040319-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040319-1.c index 571c2aeabad..d6e54497169 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20040319-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040319-1.c @@ -6,6 +6,8 @@ were not being processed by the type based alias analyzer, resulting in optimizations removing a non-redundant load. */ +extern void abort (void); + struct bar { int count; int *arr;}; void foo (struct bar *b) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040324-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040324-1.c index 15eb0d62381..be718aba692 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20040324-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040324-1.c @@ -10,6 +10,9 @@ Therefore, DOM did not see that i was modified between the two ifs and optimized away the second if. */ +extern void abort (void); +extern void exit (int); + struct x { unsigned b:1; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040326-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040326-1.c index c29655a24fd..4be6049e909 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20040326-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040326-1.c @@ -4,6 +4,9 @@ a .GLOBAL_VAR to model the side effects of functions. Without it, we were moving the call to Faref() inside the second call to Faset(). */ +extern void abort (void); +extern void exit (int); + main () { int table, c, elt; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040326-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20040326-2.c index a3e16ad451e..b1bed75dad2 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20040326-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040326-2.c @@ -4,6 +4,7 @@ /* Gimplification problem exposed by zsh. All the side-effects in function arguments and in the called expression should happen before the actual function call. */ +extern void abort (void); int A; typedef void (*fnptr) (void); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c index d3d0100a02c..5f99be2874e 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-ssa-vops" } */ +extern void abort (void); int a; extern void __attribute__ ((malloc)) *foo (); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c index 091703a1017..b5e702c57ea 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c @@ -5,6 +5,8 @@ fail to terminate when there is a nontrivial cycle in the corresponding ssa graph. */ +extern __SIZE_TYPE__ strlen (const char *); + void foo(int i) { char *s = "abcde"; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-1.c index d3c9d42152e..ca1b81c5f02 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-pre-stats" } */ +extern int printf (const char *, ...); int main(int argc, char **argv) { int a; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/tailcall-1.c b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-1.c index c2a85940a30..33901523fb3 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/tailcall-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-tailc-details" } */ +extern void *alloca (__SIZE_TYPE__); int q(int a); int *v; int diff --git a/gcc/testsuite/gcc.dg/tree-ssa/tailrecursion-5.c b/gcc/testsuite/gcc.dg/tree-ssa/tailrecursion-5.c index 2940a5019bd..d0d4f3a1e45 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/tailrecursion-5.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/tailrecursion-5.c @@ -1,6 +1,9 @@ /* { dg-do run } */ /* { dg-options "-O1 -fdump-tree-optimized" } */ +extern void abort (void); +extern void exit (int); + int sum (int n) { if (n == 0) diff --git a/gcc/testsuite/gcc.dg/ultrasp3.c b/gcc/testsuite/gcc.dg/ultrasp3.c index 5156c17e822..4458658a58e 100644 --- a/gcc/testsuite/gcc.dg/ultrasp3.c +++ b/gcc/testsuite/gcc.dg/ultrasp3.c @@ -1,6 +1,9 @@ /* { dg-options "" } */ /* { dg-options "-mcpu=ultrasparc -mv8plus" { target sparc-*-* } } */ +extern void abort (void); +extern void exit (int); + unsigned long long foo (unsigned long long x) { return 0x73500000735LL * x; diff --git a/gcc/testsuite/gcc.dg/winline-7.c b/gcc/testsuite/gcc.dg/winline-7.c index 634016d2ecf..bab82a2d682 100644 --- a/gcc/testsuite/gcc.dg/winline-7.c +++ b/gcc/testsuite/gcc.dg/winline-7.c @@ -1,6 +1,8 @@ /* { dg-do compile } */ /* { dg-options "-Winline -O2" } */ +extern void *alloca (__SIZE_TYPE__); + void big (void); inline void *q (void) { /* { dg-warning "(function not inlinable|alloca)" } */ diff --git a/gcc/testsuite/gcc.misc-tests/bprob-1.c b/gcc/testsuite/gcc.misc-tests/bprob-1.c index 94202504fb5..8c6018c566d 100644 --- a/gcc/testsuite/gcc.misc-tests/bprob-1.c +++ b/gcc/testsuite/gcc.misc-tests/bprob-1.c @@ -4,6 +4,8 @@ This test is the same as gcov-4.c. The "count" comments are left in to make comparisons easier; they are ignored for this test. */ +extern void abort (void); + int do_something (int i) { return i; diff --git a/gcc/testsuite/gcc.misc-tests/bprob-2.c b/gcc/testsuite/gcc.misc-tests/bprob-2.c index 4615b34f4ff..e0931f39c46 100644 --- a/gcc/testsuite/gcc.misc-tests/bprob-2.c +++ b/gcc/testsuite/gcc.misc-tests/bprob-2.c @@ -3,6 +3,9 @@ This is the same as test gcc.c-torture/execute/980526-1.c and gcc.misc-tests/gcov-3.c */ +extern void abort (void); +extern void exit (int); + int expect_do1 = 1, expect_do2 = 2; static int doit(int x){ diff --git a/gcc/testsuite/gcc.misc-tests/gcov-3.c b/gcc/testsuite/gcc.misc-tests/gcov-3.c index 36fe64f802b..fcccdeeff41 100644 --- a/gcc/testsuite/gcc.misc-tests/gcov-3.c +++ b/gcc/testsuite/gcc.misc-tests/gcov-3.c @@ -4,6 +4,9 @@ /* { dg-options "-fprofile-arcs -ftest-coverage" } */ /* { dg-do run { target native } } */ +extern void abort (void); +extern void exit (int); + int expect_do1 = 1, expect_do2 = 2; static int doit(int x){ diff --git a/gcc/testsuite/gcc.misc-tests/gcov-4.c b/gcc/testsuite/gcc.misc-tests/gcov-4.c index 27ef508cfe6..9d8ab1c1097 100644 --- a/gcc/testsuite/gcc.misc-tests/gcov-4.c +++ b/gcc/testsuite/gcc.misc-tests/gcov-4.c @@ -4,6 +4,8 @@ /* { dg-options "-fprofile-arcs -ftest-coverage" } */ /* { dg-do run { target native } } */ +extern void abort (void); + int do_something (int i) { return i; diff --git a/gcc/testsuite/gcc.misc-tests/gcov-4b.c b/gcc/testsuite/gcc.misc-tests/gcov-4b.c index 139f10d86c9..7653c5897ad 100644 --- a/gcc/testsuite/gcc.misc-tests/gcov-4b.c +++ b/gcc/testsuite/gcc.misc-tests/gcov-4b.c @@ -4,6 +4,8 @@ /* { dg-options "-fprofile-arcs -ftest-coverage" } */ /* { dg-do run { target native } } */ +extern void abort (void); + int do_something (int i) { return i; diff --git a/gcc/testsuite/gcc.misc-tests/gcov-6.c b/gcc/testsuite/gcc.misc-tests/gcov-6.c index 90273d56396..aefab3ed33a 100644 --- a/gcc/testsuite/gcc.misc-tests/gcov-6.c +++ b/gcc/testsuite/gcc.misc-tests/gcov-6.c @@ -6,6 +6,8 @@ /* { dg-options "-fprofile-arcs -ftest-coverage" } */ /* { dg-do run { target native } } */ +extern void exit (int); + int val; void diff --git a/gcc/testsuite/gcc.misc-tests/gcov-7.c b/gcc/testsuite/gcc.misc-tests/gcov-7.c index 700cec6f533..2e0f6e8b03c 100644 --- a/gcc/testsuite/gcc.misc-tests/gcov-7.c +++ b/gcc/testsuite/gcc.misc-tests/gcov-7.c @@ -6,6 +6,9 @@ #include +extern void abort (void); +extern void exit (int); + jmp_buf env; int val; int longjmp_taken; diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c index 5774963d04f..a44c6076481 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c +++ b/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c @@ -3,6 +3,8 @@ /* { dg-do compile { target i?86-*-* } } */ +extern void exit (int); + char *msg = "howdy there"; void foo (char *p) diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c index 301e8b7ed9f..09a67d83426 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c +++ b/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c @@ -4,6 +4,8 @@ /* { dg-do compile { target i?86-*-* } } */ +extern void exit (int); + char *msg = "howdy there"; void foo (char *p) diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c index bdd236ade88..0ad3220e856 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c +++ b/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c @@ -3,6 +3,8 @@ /* { dg-do compile { target i?86-*-* } } */ +extern void exit (int); + char *msg = "howdy there"; void foo (char *p) diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c index 783fc822dae..15275775caa 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c +++ b/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c @@ -3,6 +3,8 @@ /* { dg-do compile { target i?86-*-* } } */ +extern void exit (int); + char *msg = "howdy there"; void foo (char *p) diff --git a/gcc/testsuite/objc.dg/nested-func-1.m b/gcc/testsuite/objc.dg/nested-func-1.m index 7a182bd938e..8ec3f722c11 100644 --- a/gcc/testsuite/objc.dg/nested-func-1.m +++ b/gcc/testsuite/objc.dg/nested-func-1.m @@ -4,6 +4,7 @@ /* { dg-options "-lobjc" } */ /* { dg-do run } */ #include +#include #include #include diff --git a/gcc/testsuite/objc.dg/special/unclaimed-category-1.m b/gcc/testsuite/objc.dg/special/unclaimed-category-1.m index 8b8af5ed307..b3a8c28b5e6 100644 --- a/gcc/testsuite/objc.dg/special/unclaimed-category-1.m +++ b/gcc/testsuite/objc.dg/special/unclaimed-category-1.m @@ -4,6 +4,8 @@ #include #include +extern void abort (void); + /* Test loading unclaimed categories - categories of a class defined separately from the class itself. */ -- 2.30.2