diff options
author | Richard Henderson <rth@redhat.com> | 2004-03-02 18:44:48 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2004-03-02 18:44:48 +0000 |
commit | ba1568ab4858323e156e560e499c541c8c8040cc (patch) | |
tree | dd35500ee06254fc932ff1eec75bc69927a31fbf /gcc/testsuite | |
parent | e2e520b3f8f6e7f9f71bea37ffe2cecfa431a886 (diff) |
Merge to tree-ssa-20020619-merge-20040227.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@78772 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
50 files changed, 606 insertions, 395 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1ddb5405f3d..acc1d32162d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,10 +1,365 @@ +2004-02-26 Richard Henderson <rth@redhat.com> + + * g++.dg/ext/attrib10.C: Mark for warning. + * gcc.dg/attr-alias-1.c: New. + +2004-02-26 Richard Henderson <rth@redhat.com> + + * gcc.c-torture/execute/ieee/20040208-2.c: Move ... + * gcc.c-torture/execute/20040208-2.c: ... it back. + +2004-02-26 Eric Christopher <echristo@redhat.com> + + * lib/target-supports.exp (check-iconv-available): New function. + * lib/gcc-dg.exp (dg-require-iconv): New function. + Use above. + * gcc.dg/charset: New directory. + * gcc.dg/charset/charset.exp: New file. + * gcc.dg/charset/asm1.c: Ditto. + * gcc.dg/charset/asm2.c: Ditto. + * gcc.dg/charset/asm3.c: Ditto. + * gcc.dg/charset/asm4.c: Ditto. + * gcc.dg/charset/asm5.c: Ditto. + * gcc.dg/charset/attribute1.c: Ditto. + * gcc.dg/charset/attribute2.c: Ditto. + * gcc.dg/charset/string1.c: Ditto. + * g++.dg/charset: New directory. + * g++.dg/dg.exp: Add here. Special options. + * g++.dg/charset/charset.exp: New file. + * g++.dg/charset/asm1.c: Ditto. + * g++.dg/charset/asm2.c: Ditto. + * g++.dg/charset/asm3.c: Ditto. + * g++.dg/charset/asm4.c: Ditto. + * g++.dg/charset/attribute1.c: Ditto. + * g++.dg/charset/attribute2.c: Ditto. + * g++.dg/charset/extern1.cc: Ditto. + * g++.dg/charset/extern2.cc: Ditto. + * g++.dg/charset/string1.c: Ditto. + +2004-02-26 Mark Mitchell <mark@codesourcery.com> + + PR c++/14278 + * g++.dg/parse/comma1.C: New test. + +2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + PR c++/14284 + * g++.dg/template/ttp8.C: New test. + +2004-02-26 Eric Botcazou <ebotcazou@act-europe.fr> + + * gcc.dg/fixuns-trunc-1.c: New test. + +2004-02-26 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * gcc.dg/builtins-config.h: Use #elif. + +2004-02-26 Michael Matz <matz@suse.de> + + * gcc.dg/20000724-1.c: Add regparm attribute to decl and def. + * gcc.dg/991214-1.c: Likewise. + * gcc.dg/i386-asm-1.c: Likewise. + +2004-02-25 Richard Henderson <rth@redhat.com> + + * gcc.c-torture/execute/20040208-2.c: Move ... + * gcc.c-torture/execute/ieee/20040208-2.c: ... here. + +2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + PR c++/14246 + * g++.dg/other/crash-3.C: New test. + +2004-02-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * g++.dg/opt/inline4.C (dg-final): Robustify regexp. + * g++.dg/opt/inline6.C (dg-final): Robustify regexp. + + * gcc.dg/builtins-config.h (HAVE_C99_RUNTIME): Don't define for PA + HP-UX. + +2004-02-24 Michael Matz <matz@suse.de> + + * gcc.dg/i386-regparm.c: New. + +2004-02-23 James E Wilson <wilson@specifixinc.com> + + * gcc.c-torture/execute/20040223-1.c: New. + +2004-02-23 Zack Weinberg <zack@codesourcery.com> + Kazu Hirata <kazu@cs.umass.edu> + + * gcc.dg/fwritable-strings-1.c: Remove. + +2004-02-23 Andrew Pinski <pinskia@physics.uc.edu> + + PR c/14156 + * gcc.dg/20040223-1.c: New test. + +2004-02-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/14106 + * g++.dg/ext/typeof9.C: New test. + +2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + PR c++/14250 + * g++.dg/other/switch1.C: New test. + +2004-02-23 Eric Botcazou <ebotcazou@libertysurf.fr> + + * gcc.dg/cast-function-1.c: Adjust for new informative message. + * gcc.dg/va-arg-1.c: Likewise. + +2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + PR c++/14143 + * g++.dg/template/koenig5.C: New test. + +2004-02-21 Ziemowit Laski <zlaski@apple.com> + + * g++.dg/ext/altivec-1.C: Generalize target triple. + * g++.dg/ext/altivec-2.C: New test case. + * g++.dg/ext/altivec_check.h: New file. + * gcc.dg/altivec-1.c: Generalize target triple; + include altivec_check.h and call altivec_check(). + * gcc.dg/altivec-[2-5].c: Generalize target triple. + * gcc.dg/altivec-6.c: New test case. + * gcc.dg/altivec-[7-9].c: Generalize target triple; add + type casts as needed. + * gcc.dg/altivec-10.c: Include altivec_check.h and call + altivec_check(). + * gcc.dg/altivec-12.c: New test case. + * gcc.dg/altivec-varargs-1.c: Generalize target triple; + include altivec_check.h and call altivec_check(). + * gcc.dg/altivec_check.h: New file. + +2004-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * lib/target-supports.exp (check_alias_available): Don't mangle + function `g' in test program. + +2004-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * lib/target-supports.exp (check_profiling_available): Check + argument to determine whether we support a profiling type. + * lib/gcc-dg.exp (dg-require-profiling): Pass argument to + check_profiling_available. + * g++.dg/bprob/bprob.exp: Likewise + * g77.dg/bprob/bprob.exp: Likewise. + * gcc.misc-tests/bprob.exp: Likewise. + * g++.old-deja/g++.law/profile1.C: Pass profiling type to + dg-require-profiling and delete expected error handling. + * gcc.dg/20021014-1.c: Likewise. + * gcc.dg/nest.c: Likewise. + +2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR c++/12007 + * g++.dg/other/vthunk1.C: New test. + +2004-02-20 Falk Hueffner <falk@debian.org> + + PR target/14201 + * gcc.c-torture/compile/fix-trunc-mem-1.c: New test. + +2004-02-20 Mark Mitchell <mark@codesourcery.com> + + PR c++/13927 + * g++.dg/other/error8.C: Remove XFAIL markers. + + PR c++/14173 + * g++.dg/ext/packed5.C: New test. + + PR c++/14199 + * g++.dg/warn/Wunused-5.C: New test. + + PR c++/14186 + * g++.dg/lookup/member1.C: New test. + +2004-02-19 Kazu Hirata <kazu@cs.umass.edu> + + * gcc.c-torture/compile/20040130-1.c: Enable only when + __INT_MAX__ >= 2147483647L. + * gcc.c-torture/compile/961203-1.c: Likewise. + +2004-02-19 Nathan Sidwell <nathan@codesourcery.com> + + * g++.dg/parse/attr-ctor1.C: XFAIL on hppa. + * g++.dg/opt/template1.C: Robustify assembler regexp + +2004-02-19 Eric Botcazou <ebotcazou@libertysurf.fr> + + * gcc.c-torture/execute/simd-4.x: Remove. + * gcc.c-torture/execute/va-arg-25.x: Likewise. + * gcc.dg/compat/vector-1_x.c: Do not XFAIL on SPARC. + Guard with #ifndef SKIP_ATTRIBUTE. + * gcc.dg/compat/vector-1_y.c: Likewise. + * gcc.dg/compat/vector-2_x.c: Likewise. + * gcc.dg/compat/vector-2_y.c: Likewise. + * g++.dg/eh/simd-1.C: Do not XFAIL on SPARC. + * g++.dg/eh/simd-2.C: Likewise. + +2004-02-19 Alan Modra <amodra@bigpond.net.au> + + * gcc.c-torture/compile/complex-1.c: New. + +2004-02-19 Hans-Peter Nilsson <hp@axis.com> + + PR target/14209 + * gcc.c-torture/execute/20040218-1.c: New test. + +2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + PR c++/14181 + * g++.dg/parse/new2.C: New test. + +2004-02-18 Paul Brook <paul@codesourcery.com> + + * gcc.c-torture/compile/libcall-1.c: New test. + +2004-02-18 Paul Brook <paul@codesourcery.com> + + PR debug/12934 + * gcc.dg/debug/debug-7.c: New test. + +2004-02-17 Ulrich Weigand <uweigand@de.ibm.com> + + * gcc.dg/20040217-1.c: New test. + +2004-02-17 Zack Weinberg <zack@codesourcery.com> + + * gcc.c-torture/execute/990208-1.x: Delete. + 2004-02-17 Richard Sandiford <rsandifo@redhat.com> - * gcc.c-torture/execute/20040208-2.x: New file. + * gcc.c-torture/execute/20040208-2.x: New file. + +2004-02-17 Mark Mitchell <mark@codesourcery.com> + + PR c++/11326 + * g++.dg/abi/structret1.C: New test. + +2004-02-17 Jakub Jelinek <jakub@redhat.com> + + * gcc.dg/i386-cpuid.h (bit_CMOV): Define. + (i386_cpuid): No need to test if cpuid is available on AMD64. + Fix assembly, so that it works onboth i386 and AMD64. + * gcc.dg/i386-sse-6.c: Include stdio.h, stdlib.h and string.h. + (vecInLong): Fix s[] member type to unsigned int. + (vecInWord): Remove type. + (mmx_tests, sse_tests, dump64_16, dump64_32, dump64_64): Remove. + (a64, b64, c64, d64, e64): Remove. + (main): Pass if CPU has no MMX, SSE, SSE2 or CMOV support. + Remove unused variable. Remove initialization of removed variables. + Don't call mmx_tests nor sse_tests. + (reference_mmx, reference_sse): Remove. + (check): Add return stmt. + * gcc.dg/i386-sse-7.c: New test. + * gcc.dg/i386-mmx-4.c: New test. + +2004-02-17 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + * g++.dg/tc1/dr176.C: Add missing semicolon (typo). + * g++.dg/tc1/dr101.C, g++.dg/tc1/dr135.C, g++.dg/tc1/dr142.C, + g++.dg/tc1/dr152.C, g++.dg/tc1/dr159.C, g++.dg/tc1/dr161.C, + g++.dg/tc1/dr166.C, g++.dg/tc1/dr176.C, g++.dg/tc1/dr193.C, + g++.dg/tc1/dr194.C, g++.dg/tc1/dr217.C, g++.dg/tc1/dr56.C, + g++.dg/tc1/dr68.C, g++.dg/tc1/dr76.C, g++.dg/tc1/dr80.C, + g++.dg/tc1/dr94.C: Fix line terminator. + +2004-02-16 Geoffrey Keating <geoffk@apple.com> + + * gcc.c-torture/compile/20040216-1.c: New. + +2004-02-16 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + * g++.dg/tc1/dr101.C, g++.dg/tc1/dr135.C, g++.dg/tc1/dr142.C, + g++.dg/tc1/dr152.C, g++.dg/tc1/dr159.C, g++.dg/tc1/dr161.C, + g++.dg/tc1/dr166.C, g++.dg/tc1/dr176.C, g++.dg/tc1/dr188.C, + g++.dg/tc1/dr193.C, g++.dg/tc1/dr194.C, g++.dg/tc1/dr217.C, + g++.dg/tc1/dr48.C, g++.dg/tc1/dr56.C, g++.dg/tc1/dr68.C, + g++.dg/tc1/dr76.C, g++.dg/tc1/dr80.C, g++.dg/tc1/dr94.C: New tests. + +2004-02-16 Eric Botcazou <ebotcazou@libertysurf.fr> + + * gcc.c-torture/execute/20020720-1.x: XFAIL on SPARC with -fPIC. + +2004-02-15 Mark Mitchell <mark@codesourcery.com> + + PR c++/13971 + * g++.dg/expr/cond4.C: New test. + + PR c++/14086 + * g++.dg/lookup/crash2.C: New test. + +2004-02-14 Josef Zlomek <zlomekj@suse.cz> + + * gcc.c-torture/compile/20040214-2.c: New test. + +2004-02-14 Andrew Pinski <pinskia@physics.uc.edu> + + PR c++/14116 + * g++.dg/ext/typeof8.C: New test. + +2004-02-14 Eric Botcazou <ebotcazou@act-europe.fr> + + * gcc.c-torture/compile/20040214-1.c: New test. + +2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/13635 + * g++.dg/template/spec11.C: New test. + +2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + PR c++/13927 + * g++.dg/other/error8.C: New test. + +2004-02-13 Mark Mitchell <mark@codesourcery.com> + + PR c++/14122 + * g++.dg/template/array4.C: New test. + + PR c++/14108 + * g++.dg/inherit/thunk2.C: New test. + + PR c++/14083 + * g++.dg/eh/cond2.C: New test. + +2004-02-12 Alan Modra <amodra@bigpond.net.au> + + * gcc.dg/debug/20020327-1.c: Disable for powerpc64. + +2004-02-12 Nathaniel Smith <njs@codesourcery.com> + + * lib/scanasm.exp (dg-scan): Quote pattern before display. + +2004-02-12 Hartmut Penner <hpenner@de.ibm.com> + + * g++.dg/simd-2.C: xfail on ppc64-linux. + +2004-02-11 Joseph S. Myers <jsm@polyomino.org.uk> + + PR c/456 + * gcc.dg/cpp/c90-if-comma-1.c, gcc.dg/cpp/c99-if-comma-1.c: New + tests. + +2004-02-11 Uros Bizjak <uros@kss-loka.si> + + * gcc.dg/builtins-33.c: New test. + +2004-02-11 Paolo Bonzini <bonzini@gnu.org> + + * gcc.dg/pr14092-1.c: Use intptr_t for the cast. 2004-02-11 Hartmut Penner <hpenner@de.ibm.com> - * gcc.dg/ppc64-abi-3.c: New test. + * g++.dg/simd-2.C: Set -maltivec for ppc64. + +2004-02-11 Hartmut Penner <hpenner@de.ibm.com> + + * gcc.dg/ppc64-abi-3.c: New test. 2004-02-10 Paolo Bonzini <bonzini@gnu.org> @@ -20746,4 +21101,3 @@ rlsruhe.de> correspond to c-torture 1.11. * New file. - diff --git a/gcc/testsuite/g++.dg/bprob/bprob.exp b/gcc/testsuite/g++.dg/bprob/bprob.exp index bef57836cf1..ea458fa1797 100644 --- a/gcc/testsuite/g++.dg/bprob/bprob.exp +++ b/gcc/testsuite/g++.dg/bprob/bprob.exp @@ -21,7 +21,7 @@ load_lib target-supports.exp # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. -if { ![check_profiling_available] } { +if { ![check_profiling_available "-fprofile-arcs"] } { return } diff --git a/gcc/testsuite/g++.dg/dg.exp b/gcc/testsuite/g++.dg/dg.exp index d9839608733..f809f10f2db 100644 --- a/gcc/testsuite/g++.dg/dg.exp +++ b/gcc/testsuite/g++.dg/dg.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # G++ testsuite that uses the `dg.exp' driver. @@ -32,6 +32,7 @@ dg-init # that are handled specially. set tests [lsort [find $srcdir/$subdir *.C]] set tests [prune $tests $srcdir/$subdir/bprob/*] +set tests [prune $tests $srcdir/$subdir/charset/*] set tests [prune $tests $srcdir/$subdir/compat/*] set tests [prune $tests $srcdir/$subdir/debug/*] set tests [prune $tests $srcdir/$subdir/gcov/*] diff --git a/gcc/testsuite/g++.dg/eh/simd-1.C b/gcc/testsuite/g++.dg/eh/simd-1.C index d10a74ab274..667aafe2d91 100644 --- a/gcc/testsuite/g++.dg/eh/simd-1.C +++ b/gcc/testsuite/g++.dg/eh/simd-1.C @@ -3,7 +3,6 @@ // { dg-options "-O" } // { dg-options "-O -w" { target i?86-*-* } } // { dg-do run } -// { dg-error "" "PR target/12916" { target sparc*-*-* } 11 } typedef int __attribute__((mode(V2SI))) vecint; diff --git a/gcc/testsuite/g++.dg/eh/simd-2.C b/gcc/testsuite/g++.dg/eh/simd-2.C index 1a9851e37f0..ee0932396bc 100644 --- a/gcc/testsuite/g++.dg/eh/simd-2.C +++ b/gcc/testsuite/g++.dg/eh/simd-2.C @@ -2,9 +2,8 @@ // Contributed by Aldy Hernandez (aldy@quesejoda.com). // { dg-options "-O" } // { dg-options "-O -w" { target i?86-*-* } } -// { dg-do run } -// { dg-error "" "PR target/12916" { target sparc64-*-* sparcv9-*-* } 12 } -// { dg-error "" "PR target/12916" { target sparc-*-* } 14 } +// { dg-options "-O -w -maltivec" { target powerpc64-*-linux* } } +// { dg-do run { xfail "powerpc64-*-linux*"} } typedef int __attribute__((mode(V4SI))) vecint; @@ -44,6 +43,10 @@ void f1 (void) int main () { +#if defined(__powerpc64__) && defined(__linux__) + // Don't run on ppc64-linux, since not always AltiVec regs available + return -1; +#endif f1 (); return 0; } diff --git a/gcc/testsuite/g++.dg/ext/altivec-1.C b/gcc/testsuite/g++.dg/ext/altivec-1.C index b7e3af30009..09c23433297 100644 --- a/gcc/testsuite/g++.dg/ext/altivec-1.C +++ b/gcc/testsuite/g++.dg/ext/altivec-1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target powerpc-*-* } } */ +/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-options "-maltivec" } */ #include <altivec.h> diff --git a/gcc/testsuite/g++.dg/ext/attrib10.C b/gcc/testsuite/g++.dg/ext/attrib10.C index 99459c78242..42d967dde60 100644 --- a/gcc/testsuite/g++.dg/ext/attrib10.C +++ b/gcc/testsuite/g++.dg/ext/attrib10.C @@ -3,6 +3,6 @@ void foo() { - extern void bar () __attribute__ ((__alias__ ("BAR"))); + extern void bar () __attribute__ ((__alias__ ("BAR"))); // { dg-warning "ignored" } bar (); } diff --git a/gcc/testsuite/g++.dg/opt/inline4.C b/gcc/testsuite/g++.dg/opt/inline4.C index 1db4fe1860b..2eaad115fc1 100644 --- a/gcc/testsuite/g++.dg/opt/inline4.C +++ b/gcc/testsuite/g++.dg/opt/inline4.C @@ -10,4 +10,4 @@ void h() { g<250>(); } -// { dg-final { scan-assembler-not "_Z1g" } } +// { dg-final { scan-assembler-not "\n_?_Z1gILi\[0-9\]+EEvv\[: \t\n\]" } } diff --git a/gcc/testsuite/g++.dg/opt/inline6.C b/gcc/testsuite/g++.dg/opt/inline6.C index 21872210558..b1616c7e721 100644 --- a/gcc/testsuite/g++.dg/opt/inline6.C +++ b/gcc/testsuite/g++.dg/opt/inline6.C @@ -1,6 +1,6 @@ // PR c++/13081 // { dg-options "-O2" } -// { dg-final { scan-assembler-not "foo" } } +// { dg-final { scan-assembler-not "\n_?_Z3fooIlET_S0_\[: \t\n\]" } } template<typename T> T foo(T); diff --git a/gcc/testsuite/g++.dg/opt/template1.C b/gcc/testsuite/g++.dg/opt/template1.C index 9003be1ee17..f2543469391 100644 --- a/gcc/testsuite/g++.dg/opt/template1.C +++ b/gcc/testsuite/g++.dg/opt/template1.C @@ -1,5 +1,5 @@ // { dg-options "-O2" } -// { dg-final { scan-assembler-not "foo1" } } +// { dg-final { scan-assembler-not "\n_?_ZN1AILi0EE4foo1Ev\[: \t\n\]" } } template <int> struct A { diff --git a/gcc/testsuite/g++.dg/parse/attr-ctor1.C b/gcc/testsuite/g++.dg/parse/attr-ctor1.C index 4f8cd1dde66..d48543cf100 100644 --- a/gcc/testsuite/g++.dg/parse/attr-ctor1.C +++ b/gcc/testsuite/g++.dg/parse/attr-ctor1.C @@ -2,7 +2,9 @@ // Origin: <petr@scssoft.com> // { dg-do compile } +// Requires section attribute support + class A { - __attribute__((section("whatever"))) A(); + __attribute__((section("whatever"))) A(); // { dg-bogus "" "" { xfail hppa*-*-hpux* } } }; diff --git a/gcc/testsuite/g++.old-deja/g++.law/profile1.C b/gcc/testsuite/g++.old-deja/g++.law/profile1.C index 9ca4a915469..2fa633ba17e 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/profile1.C +++ b/gcc/testsuite/g++.old-deja/g++.law/profile1.C @@ -1,5 +1,5 @@ -// { dg-do run { xfail mips*-*-* i[3456]86-*-sco3.2v5* } } -// { dg-require-profiling "" } +// { dg-do run { xfail i[3456]86-*-sco3.2v5* } } +// { dg-require-profiling "-pg" } // { dg-options "-pg" } // { dg-options "-pg -static" { target hppa*-*-hpux* } } // GROUPS passed profiling diff --git a/gcc/testsuite/g77.dg/bprob/bprob.exp b/gcc/testsuite/g77.dg/bprob/bprob.exp index 6eb45be2e36..e453f4e66f8 100644 --- a/gcc/testsuite/g77.dg/bprob/bprob.exp +++ b/gcc/testsuite/g77.dg/bprob/bprob.exp @@ -21,7 +21,7 @@ load_lib target-supports.exp # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. -if { ![check_profiling_available] } { +if { ![check_profiling_available "-fprofile-arcs"] } { return } diff --git a/gcc/testsuite/gcc.c-torture/compile/20040130-1.c b/gcc/testsuite/gcc.c-torture/compile/20040130-1.c index 0edcea44ede..e661c176ac6 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20040130-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20040130-1.c @@ -12,9 +12,13 @@ struct unsigned int :4; unsigned short :14; unsigned int G938:8; +#if __INT_MAX__ >= 2147483647L unsigned int :30; +#endif unsigned short :16; +#if __INT_MAX__ >= 2147483647L unsigned int :18; +#endif unsigned short G939:9; } G928b; diff --git a/gcc/testsuite/gcc.c-torture/compile/961203-1.c b/gcc/testsuite/gcc.c-torture/compile/961203-1.c index 40cac8e3d05..98908584333 100644 --- a/gcc/testsuite/gcc.c-torture/compile/961203-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/961203-1.c @@ -1,8 +1,8 @@ /* The structure is too large for the xstormy16 - won't fit in 16 bits. */ -/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */ -/* { dg-do assemble { xfail xstormy16-*-* m6811-*-* m6812-*-* } } */ +/* { dg-do assemble } */ +#if __INT_MAX__ >= 2147483647L struct s { char a[0x32100000]; int x:30, y:30; @@ -17,3 +17,6 @@ main () if (p->x == p->y) exit (1); } +#else +int g; +#endif diff --git a/gcc/testsuite/gcc.c-torture/execute/20020720-1.x b/gcc/testsuite/gcc.c-torture/execute/20020720-1.x index 2520c74f2b4..1f7137b153a 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20020720-1.x +++ b/gcc/testsuite/gcc.c-torture/execute/20020720-1.x @@ -11,6 +11,19 @@ # and can make the optimization. # Don't XFAIL at -O0, that should never fail. +if { [istarget "sparc*-*-*"] } { + set torture_eval_before_compile { + global compiler_conditional_xfail_data + set compiler_conditional_xfail_data { + "PR opt/10348" \ + { "*-*-*" } \ + { "-fpic" "-fPIC" } \ + { "-O0" } + } + } + return 0 +} + set torture_eval_before_compile { global compiler_conditional_xfail_data set compiler_conditional_xfail_data { diff --git a/gcc/testsuite/gcc.c-torture/execute/990208-1.x b/gcc/testsuite/gcc.c-torture/execute/990208-1.x deleted file mode 100644 index c1710099151..00000000000 --- a/gcc/testsuite/gcc.c-torture/execute/990208-1.x +++ /dev/null @@ -1,14 +0,0 @@ -# Doesn't work at -O3 because of ifcvt.c optimizations which -# cause the 2 inlined labels to be at the same location. - -set torture_eval_before_execute { - - set compiler_conditional_xfail_data { - "ifcvt transforms 2 inlined labels to the same address" \ - { "ia64-*-*" "arm*-*-*" "strongarm*-*-*" "xscale*-*-*" } \ - { "-O3" } \ - { "" } - } -} - -return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/simd-4.x b/gcc/testsuite/gcc.c-torture/execute/simd-4.x deleted file mode 100644 index f5644cb24fc..00000000000 --- a/gcc/testsuite/gcc.c-torture/execute/simd-4.x +++ /dev/null @@ -1,13 +0,0 @@ -# This doesn't work on sparc*-*-* at -O0. - -set torture_eval_before_compile { - global compiler_conditional_xfail_data - set compiler_conditional_xfail_data { - "PR target/12916" \ - { "sparc*-*-*" } \ - { "-O0" } \ - { "" } - } -} - -return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/va-arg-25.x b/gcc/testsuite/gcc.c-torture/execute/va-arg-25.x deleted file mode 100644 index ff301be355a..00000000000 --- a/gcc/testsuite/gcc.c-torture/execute/va-arg-25.x +++ /dev/null @@ -1,25 +0,0 @@ -# This doesn't work on SPARC 64-bit. - -if { [istarget "sparc64-*-*"] || [istarget "sparcv9-*-*"] } { - set torture_eval_before_compile { - global compiler_conditional_xfail_data - set compiler_conditional_xfail_data { - "PR target/12916" \ - { "*-*-*" } \ - { "*" } \ - { "-m32" } - } - } -} elseif { [istarget "sparc-*-*"] } { - set torture_eval_before_compile { - global compiler_conditional_xfail_data - set compiler_conditional_xfail_data { - "PR target/12916" \ - { "*-*-*" } \ - { "-m64" } \ - { "" } - } - } -} - -return 0 diff --git a/gcc/testsuite/gcc.dg/20000724-1.c b/gcc/testsuite/gcc.dg/20000724-1.c index 5027d6e9746..3c4f2c39409 100644 --- a/gcc/testsuite/gcc.dg/20000724-1.c +++ b/gcc/testsuite/gcc.dg/20000724-1.c @@ -22,7 +22,7 @@ int baz(void *x) void do_check (struct s *) asm ("do_check") __attribute__((regparm(1))); -void do_check(struct s *x) +void __attribute__((regparm(1))) do_check(struct s *x) { if (x->a.a || x->b || x->c.a.a) abort(); diff --git a/gcc/testsuite/gcc.dg/20021014-1.c b/gcc/testsuite/gcc.dg/20021014-1.c index 1e2b76c7614..67f88ae2f6b 100644 --- a/gcc/testsuite/gcc.dg/20021014-1.c +++ b/gcc/testsuite/gcc.dg/20021014-1.c @@ -1,17 +1,9 @@ /* { dg-do run } */ -/* { dg-require-profiling "" } */ +/* { dg-require-profiling "-p" } */ /* { dg-options "-O2 -p" } */ /* { dg-options "-O2 -p -static" { target hppa*-*-hpux* } } */ /* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */ /* { dg-error "" "consider using `-pg' instead of `-p' with gprof(1)" { target *-*-freebsd* } 0 } */ -/* Support for -p on solaris2 relies on mcrt1.o which comes with the - vendor compiler. We cannot reiably predict the directory where the - vendor compiler (and thus mcrt1.o) is installed so we can't - necessarily find mcrt1.o even if we have it. */ -/* { dg-error "mcrt1.o" "Optional vendor profiler support missing" { target *-*-solaris2* } 0 } */ -/* Support for -p on irix relies on libprof1.a which doesn't appear to - exist on any irix6 system currently posting testsuite results. */ -/* { dg-error "libprof1.a" "Profiler support missing" { target mips*-*-irix* } 0 } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/991214-1.c b/gcc/testsuite/gcc.dg/991214-1.c index c8e3a04049d..68b6b927916 100644 --- a/gcc/testsuite/gcc.dg/991214-1.c +++ b/gcc/testsuite/gcc.dg/991214-1.c @@ -4,7 +4,7 @@ /* Test against a problem with the combiner substituting explicit hard reg references when it shouldn't. */ void foo (int, int) __attribute__ ((regparm (3))); -void foo (int x, int y) +void __attribute__((regparm(3))) foo (int x, int y) { __asm__ __volatile__("" : : "d" (x), "r" (y)); } diff --git a/gcc/testsuite/gcc.dg/altivec-1.c b/gcc/testsuite/gcc.dg/altivec-1.c index 3d37a2e1c76..59654bee2c9 100644 --- a/gcc/testsuite/gcc.dg/altivec-1.c +++ b/gcc/testsuite/gcc.dg/altivec-1.c @@ -1,9 +1,10 @@ -/* { dg-do run { target powerpc-*-*altivec powerpc-*-*-*altivec } } */ +/* { dg-do run { target powerpc*-*-* } } */ /* { dg-options "-maltivec" } */ /* Program to test PowerPC AltiVec instructions. */ #include <altivec.h> +#include "altivec_check.h" extern void abort (void); @@ -22,6 +23,8 @@ vector float f, g, h; int main () { + altivec_check(); /* Exits if AltiVec not supported */ + k = vec_add (a1, a2); if (!vec_all_eq (addi, k)) abort (); diff --git a/gcc/testsuite/gcc.dg/altivec-10.c b/gcc/testsuite/gcc.dg/altivec-10.c index 8d9223f3be4..a0225a4dd78 100644 --- a/gcc/testsuite/gcc.dg/altivec-10.c +++ b/gcc/testsuite/gcc.dg/altivec-10.c @@ -4,11 +4,7 @@ #include <altivec.h> #include <signal.h> -void -sig_ill_handler (int sig) -{ - exit(0); -} +#include "altivec_check.h" typedef union { @@ -62,7 +58,7 @@ check_cmple() { vector float a = {1.0, 2.0, 3.0, 4.0}; vector float b = {1.0, 3.0, 2.0, 5.0}; - vector signed int aux; + vector bool int aux; vector signed int le = {-1, -1, 0, -1}; aux = vec_cmple (a, b); @@ -75,10 +71,7 @@ check_cmple() int main() { - /* Exit on systems without altivec. */ - signal (SIGILL, sig_ill_handler); - asm volatile ("vor 0,0,0"); - signal (SIGILL, SIG_DFL); + altivec_check (); check_cmple (); check_vec_all_num (); diff --git a/gcc/testsuite/gcc.dg/altivec-2.c b/gcc/testsuite/gcc.dg/altivec-2.c index 3c74d392a3e..f64081ff813 100644 --- a/gcc/testsuite/gcc.dg/altivec-2.c +++ b/gcc/testsuite/gcc.dg/altivec-2.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target powerpc-*-* } } */ +/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-options "-maltivec" } */ /* Program to test the vector_size attribute. This needs to run on a diff --git a/gcc/testsuite/gcc.dg/altivec-3.c b/gcc/testsuite/gcc.dg/altivec-3.c index c82f1e2a214..1321a729a9a 100644 --- a/gcc/testsuite/gcc.dg/altivec-3.c +++ b/gcc/testsuite/gcc.dg/altivec-3.c @@ -1,6 +1,8 @@ -/* { dg-do run { target powerpc-*-*altivec powerpc-*-*-*altivec } } */ +/* { dg-do run { target powerpc*-*-* } } */ /* { dg-options "-maltivec" } */ +#include "altivec_check.h" + typedef int int4 __attribute__ ((mode(V4SI))); typedef float float4 __attribute__ ((mode(V4SF))); @@ -55,6 +57,8 @@ main () float4 f3 = (float4) { 6.0, 8.0, 10.0, 12.0 }; float4 ftmp; + altivec_check (); + vec_store (i3, a3); itmp = vec_add_int4 (a1, a2); vec_store (j3, itmp); diff --git a/gcc/testsuite/gcc.dg/altivec-4.c b/gcc/testsuite/gcc.dg/altivec-4.c index 244e31b2825..175663581ac 100644 --- a/gcc/testsuite/gcc.dg/altivec-4.c +++ b/gcc/testsuite/gcc.dg/altivec-4.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target powerpc-*-* } } */ +/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-options "-maltivec -O0 -Wall" } */ #define vector __attribute__((vector_size(16))) diff --git a/gcc/testsuite/gcc.dg/altivec-5.c b/gcc/testsuite/gcc.dg/altivec-5.c index 61d19d9cd9b..0adfdb84d19 100644 --- a/gcc/testsuite/gcc.dg/altivec-5.c +++ b/gcc/testsuite/gcc.dg/altivec-5.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target powerpc-*-* } } */ +/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-options "-maltivec -O2" } */ #define vector __attribute__((vector_size(16))) diff --git a/gcc/testsuite/gcc.dg/altivec-7.c b/gcc/testsuite/gcc.dg/altivec-7.c index 7e118d960ca..bb04b50bdf0 100644 --- a/gcc/testsuite/gcc.dg/altivec-7.c +++ b/gcc/testsuite/gcc.dg/altivec-7.c @@ -1,6 +1,6 @@ /* Origin: Aldy Hernandez <aldyh@redhat.com> */ -/* { dg-do compile { target powerpc-*-* } } */ +/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-options "-maltivec" } */ #include <altivec.h> @@ -10,19 +10,19 @@ int *var_int; unsigned long **ulongp; vector pixel *varpixel; vector signed char *vecchar; -vector signed long *vecint; +vector signed long *vecint; /* { dg-warning "use of .long. in AltiVec types is deprecated; use .int." } */ vector signed short *vecshort; vector unsigned char *vecuchar; -vector unsigned long *vecuint; +vector unsigned long *vecuint; /* { dg-warning "use of .long. in AltiVec types is deprecated; use .int." } */ vector unsigned short *vecushort; vector float *vecfloat; int main () { - *vecfloat++ = vec_andc(vecint[0], vecfloat[1]); - *vecfloat++ = vec_andc(vecfloat[0], vecint[1]); - *vecfloat++ = vec_vxor(vecint[0], vecfloat[1]); - *vecfloat++ = vec_vxor(vecfloat[0], vecint[1]); + *vecfloat++ = vec_andc((vector bool int)vecint[0], vecfloat[1]); + *vecfloat++ = vec_andc(vecfloat[0], (vector bool int)vecint[1]); + *vecfloat++ = vec_vxor((vector bool int)vecint[0], vecfloat[1]); + *vecfloat++ = vec_vxor(vecfloat[0], (vector bool int)vecint[1]); *varpixel++ = vec_packpx(vecuint[0], vecuint[1]); *varpixel++ = vec_vpkpx(vecuint[0], vecuint[1]); *vecshort++ = vec_vmulosb(vecchar[0], vecchar[1]); @@ -32,14 +32,14 @@ int main () *vecint++ = vec_lvewx(var_int[0], longp[1]); *vecint++ = vec_unpackh(vecshort[0]); *vecint++ = vec_unpackl(vecshort[0]); - *vecushort++ = vec_andc(vecshort[0], vecushort[1]); - *vecushort++ = vec_andc(vecushort[0], vecshort[1]); - *vecushort++ = vec_vxor(vecshort[0], vecushort[1]); - *vecushort++ = vec_vxor(vecushort[0], vecshort[1]); + *vecushort++ = vec_andc((vector bool short)vecshort[0], vecushort[1]); + *vecushort++ = vec_andc(vecushort[0], (vector bool short)vecshort[1]); + *vecushort++ = vec_vxor((vector bool short)vecshort[0], vecushort[1]); + *vecushort++ = vec_vxor(vecushort[0], (vector bool short)vecshort[1]); *vecuint++ = vec_ld(var_int[0], ulongp[1]); *vecuint++ = vec_lvx(var_int[0], ulongp[1]); *vecuint++ = vec_vmsumubm(vecuchar[0], vecuchar[1], vecuint[2]); - *vecuchar++ = vec_xor(vecuchar[0], vecchar[1]); + *vecuchar++ = vec_xor(vecuchar[0], (vector unsigned char)vecchar[1]); return 0; } diff --git a/gcc/testsuite/gcc.dg/altivec-8.c b/gcc/testsuite/gcc.dg/altivec-8.c index 2d6803a47ee..bbd2cf7a325 100644 --- a/gcc/testsuite/gcc.dg/altivec-8.c +++ b/gcc/testsuite/gcc.dg/altivec-8.c @@ -1,7 +1,7 @@ /* Origin: Aldy Hernandez <aldyh@redhat.com> */ /* Test rs6000_legitimate_address. PRE_INC should be invalid. */ -/* { dg-do compile { target powerpc-*-* } } */ +/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-options "-maltivec" } */ #include <altivec.h> diff --git a/gcc/testsuite/gcc.dg/altivec-9.c b/gcc/testsuite/gcc.dg/altivec-9.c index 62328221ed7..36c79d3453b 100644 --- a/gcc/testsuite/gcc.dg/altivec-9.c +++ b/gcc/testsuite/gcc.dg/altivec-9.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target powerpc-*-* } } */ +/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-options "-maltivec -mabi=altivec -g" } */ /* PR9564 */ diff --git a/gcc/testsuite/gcc.dg/altivec-varargs-1.c b/gcc/testsuite/gcc.dg/altivec-varargs-1.c index caf6a266620..14e5e6ee976 100644 --- a/gcc/testsuite/gcc.dg/altivec-varargs-1.c +++ b/gcc/testsuite/gcc.dg/altivec-varargs-1.c @@ -1,9 +1,11 @@ -/* { dg-do run { target powerpc*-*-darwin* powerpc*-*-*altivec* powerpc*-*-linux*} } */ +/* { dg-do run { target powerpc*-*-* } } */ /* { dg-options "-maltivec -mabi=altivec -fno-inline" } */ #include <stdarg.h> #include <signal.h> +#include "altivec_check.h" + #define vector __attribute__((mode(V4SI))) const vector unsigned int v1 = {10,11,12,13}; @@ -72,19 +74,10 @@ int main1(void) return 0; } -void -sig_ill_handler (int sig) -{ - exit(0); -} - int main (void) { - /* Exit on systems without altivec. */ - signal (SIGILL, sig_ill_handler); - /* Altivec instruction, 'vor %v0,%v0,%v0'. */ - asm volatile (".long 0x10000484"); - signal (SIGILL, SIG_DFL); + /* Exit on systems without AltiVec. */ + altivec_check (); return main1 (); } diff --git a/gcc/testsuite/gcc.dg/builtins-config.h b/gcc/testsuite/gcc.dg/builtins-config.h index 11f7c11ee4f..220a2aa8518 100644 --- a/gcc/testsuite/gcc.dg/builtins-config.h +++ b/gcc/testsuite/gcc.dg/builtins-config.h @@ -9,7 +9,9 @@ indicating whether or not TARGET_C99_FUNCTIONS is set, but it does not presently do that.) */ -#if defined(sun) +#if defined(__hppa) && defined(__hpux) +/* PA HP-UX doesn't have the entire C99 runtime. */ +#elif defined(sun) /* Solaris doesn't have the entire C99 runtime. */ #else /* Newlib has the "f" variants of the math functions, but not the "l" diff --git a/gcc/testsuite/gcc.dg/cast-function-1.c b/gcc/testsuite/gcc.dg/cast-function-1.c index 44cb1839623..8ed7d5da41c 100644 --- a/gcc/testsuite/gcc.dg/cast-function-1.c +++ b/gcc/testsuite/gcc.dg/cast-function-1.c @@ -22,19 +22,19 @@ void bar(void) int i; str_t s; - d = ((double (*) (int)) foo1) (i); /* { dg-warning "non-compatible" } */ - i = ((int (*) (double)) foo1) (d); /* { dg-warning "non-compatible" } */ - s = ((str_t (*) (int)) foo1) (i); /* { dg-warning "non-compatible" } */ - ((void (*) (int)) foo1) (d); /* { dg-warning "non-compatible" } */ - i = ((int (*) (int)) foo1) (i); /* { dg-bogus "non-compatible" } */ - (void) foo1 (i); /* { dg-bogus "non-compatible" } */ - - d = ((double (*) (int)) foo2) (i); /* { dg-warning "non-compatible" } */ - i = ((int (*) (double)) foo2) (d); /* { dg-bogus "non-compatible" } */ - s = ((str_t (*) (int)) foo2) (i); /* { dg-warning "non-compatible" } */ - ((void (*) (int)) foo2) (d); /* { dg-warning "non-compatible" } */ - i = ((int (*) (int)) foo2) (i); /* { dg-bogus "non-compatible" } */ - (void) foo2 (i); /* { dg-bogus "non-compatible" } */ + d = ((double (*) (int)) foo1) (i); /* { dg-warning "non-compatible|abort" } */ + i = ((int (*) (double)) foo1) (d); /* { dg-warning "non-compatible|abort" } */ + s = ((str_t (*) (int)) foo1) (i); /* { dg-warning "non-compatible|abort" } */ + ((void (*) (int)) foo1) (d); /* { dg-warning "non-compatible|abort" } */ + i = ((int (*) (int)) foo1) (i); /* { dg-bogus "non-compatible|abort" } */ + (void) foo1 (i); /* { dg-bogus "non-compatible|abort" } */ + + d = ((double (*) (int)) foo2) (i); /* { dg-warning "non-compatible|abort" } */ + i = ((int (*) (double)) foo2) (d); /* { dg-bogus "non-compatible|abort" } */ + s = ((str_t (*) (int)) foo2) (i); /* { dg-warning "non-compatible|abort" } */ + ((void (*) (int)) foo2) (d); /* { dg-warning "non-compatible|abort" } */ + i = ((int (*) (int)) foo2) (i); /* { dg-bogus "non-compatible|abort" } */ + (void) foo2 (i); /* { dg-bogus "non-compatible|abort" } */ } int foo1(int arg) diff --git a/gcc/testsuite/gcc.dg/compat/vector-1_x.c b/gcc/testsuite/gcc.dg/compat/vector-1_x.c index c7503e5d787..11995b496e5 100644 --- a/gcc/testsuite/gcc.dg/compat/vector-1_x.c +++ b/gcc/testsuite/gcc.dg/compat/vector-1_x.c @@ -1,5 +1,6 @@ /* { dg-options "-w" } */ -/* { dg-xfail-if "PR target/12916" "sparc*-*-*" "*" "" } */ + +#ifndef SKIP_ATTRIBUTE #include "compat-common.h" #include "vector-defs.h" @@ -15,9 +16,12 @@ SETUP (4, si); SETUP (1, di); SETUP (2, di); +#endif + void vector_1_x (void) { +#ifndef SKIP_ATTRIBUTE DEBUG_INIT CHECK (8, qi); @@ -34,4 +38,5 @@ vector_1_x (void) if (fails != 0) abort (); +#endif } diff --git a/gcc/testsuite/gcc.dg/compat/vector-1_y.c b/gcc/testsuite/gcc.dg/compat/vector-1_y.c index 8aa21e13e6c..1cec61734b4 100644 --- a/gcc/testsuite/gcc.dg/compat/vector-1_y.c +++ b/gcc/testsuite/gcc.dg/compat/vector-1_y.c @@ -1,5 +1,6 @@ /* { dg-options "-w" } */ -/* { dg-xfail-if "PR target/12916" "sparc*-*-*" "*" "" } */ + +#ifndef SKIP_ATTRIBUTE #include "compat-common.h" #include "vector-defs.h" @@ -14,3 +15,5 @@ TEST (2, si, 301) TEST (4, si, 302) TEST (1, di, 401) TEST (2, di, 402) + +#endif diff --git a/gcc/testsuite/gcc.dg/compat/vector-2_x.c b/gcc/testsuite/gcc.dg/compat/vector-2_x.c index 9aa49c0622f..42881330557 100644 --- a/gcc/testsuite/gcc.dg/compat/vector-2_x.c +++ b/gcc/testsuite/gcc.dg/compat/vector-2_x.c @@ -1,5 +1,6 @@ /* { dg-options "-w" } */ -/* { dg-xfail-if "PR target/12916" "sparc*-*-*" "*" "" } */ + +#ifndef SKIP_ATTRIBUTE #include "compat-common.h" #include "vector-defs.h" @@ -10,9 +11,12 @@ SETUP (4, sf); SETUP (16, sf); SETUP (2, df); +#endif + void vector_2_x (void) { +#ifndef SKIP_ATTRIBUTE DEBUG_INIT CHECK (2, sf); @@ -24,4 +28,5 @@ vector_2_x (void) if (fails != 0) abort (); +#endif } diff --git a/gcc/testsuite/gcc.dg/compat/vector-2_y.c b/gcc/testsuite/gcc.dg/compat/vector-2_y.c index 283b149a207..b04f9f64985 100644 --- a/gcc/testsuite/gcc.dg/compat/vector-2_y.c +++ b/gcc/testsuite/gcc.dg/compat/vector-2_y.c @@ -1,5 +1,6 @@ /* { dg-options "-w" } */ -/* { dg-xfail-if "PR target/12916" "sparc*-*-*" "*" "" } */ + +#ifndef SKIP_ATTRIBUTE #include "compat-common.h" #include "vector-defs.h" @@ -9,3 +10,5 @@ TEST (2, sf, 301.0) TEST (4, sf, 302.0) TEST (16, sf, 304.0) TEST (2, df, 402.0) + +#endif diff --git a/gcc/testsuite/gcc.dg/debug/20020327-1.c b/gcc/testsuite/gcc.dg/debug/20020327-1.c index 2542e682ae1..49d00a16cc7 100644 --- a/gcc/testsuite/gcc.dg/debug/20020327-1.c +++ b/gcc/testsuite/gcc.dg/debug/20020327-1.c @@ -1,4 +1,12 @@ -/* { dg-do link { xfail powerpc64*-*-* } } */ +/* { dg-do link } */ +#ifndef __powerpc64__ +/* Fails on powerpc64-linux due to the function Letext using a global + .Letext symbol that conflicts with .Letext emitted by gcc with + -gstabs. Some day the linker will be fixed to not require global + "dot" syms, but for now disable this test entirely for powerpc64. + Using xfail doesn't work, nor does dg-excess-errors because some + combinations of command line options won't cause this test to fail. */ void Letext (void) { } +#endif int main() { return 0; } diff --git a/gcc/testsuite/gcc.dg/fwritable-strings-1.c b/gcc/testsuite/gcc.dg/fwritable-strings-1.c deleted file mode 100644 index 652a0845fd0..00000000000 --- a/gcc/testsuite/gcc.dg/fwritable-strings-1.c +++ /dev/null @@ -1,18 +0,0 @@ -/* PR c/12818 */ -/* Origin: <fnf@ninemoons.com> */ - -/* { dg-do run } */ -/* { dg-options "-fwritable-strings" } */ -/* { dg-error "-fwritable-strings is deprecated" "" { target *-*-* } 0 } */ - -extern void abort(void); - -char *names[] = {"alice", "bob", "john"}; - -int main (void) -{ - if (names[1][0] != 'b') - abort(); - - return 0; -} diff --git a/gcc/testsuite/gcc.dg/i386-asm-1.c b/gcc/testsuite/gcc.dg/i386-asm-1.c index aae0de845b3..bf7aa1d0c4b 100644 --- a/gcc/testsuite/gcc.dg/i386-asm-1.c +++ b/gcc/testsuite/gcc.dg/i386-asm-1.c @@ -2,7 +2,7 @@ /* { dg-do run { target i?86-*-* } } */ /* { dg-options "-O2" } */ -static int bar(int x) __asm__("bar"); +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-cpuid.h b/gcc/testsuite/gcc.dg/i386-cpuid.h index f8e72dbb5d9..dc300e4482b 100644 --- a/gcc/testsuite/gcc.dg/i386-cpuid.h +++ b/gcc/testsuite/gcc.dg/i386-cpuid.h @@ -2,6 +2,7 @@ Used by 20020523-2.c and i386-sse-6.c, and possibly others. */ /* Plagarized from 20020523-2.c. */ +#define bit_CMOV (1 << 15) #define bit_MMX (1 << 23) #define bit_SSE (1 << 25) #define bit_SSE2 (1 << 26) @@ -17,27 +18,39 @@ i386_cpuid (void) { int fl1, fl2; - /* See if we can use cpuid. */ +#ifndef __x86_64__ + /* See if we can use cpuid. On AMD64 we always can. */ __asm__ ("pushfl; pushfl; popl %0; movl %0,%1; xorl %2,%0;" "pushl %0; popfl; pushfl; popl %0; popfl" : "=&r" (fl1), "=&r" (fl2) : "i" (0x00200000)); if (((fl1 ^ fl2) & 0x00200000) == 0) return (0); +#endif /* Host supports cpuid. See if cpuid gives capabilities, try CPUID(0). Preserve %ebx and %ecx; cpuid insn clobbers these, we don't need their CPUID values here, and %ebx may be the PIC register. */ - __asm__ ("push %%ecx ; push %%ebx ; cpuid ; pop %%ebx ; pop %%ecx" +#ifdef __x86_64__ + __asm__ ("pushq %%rcx; pushq %%rbx; cpuid; popq %%rbx; popq %%rcx" + : "=a" (fl1) : "0" (0) : "rdx", "cc"); +#else + __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx" : "=a" (fl1) : "0" (0) : "edx", "cc"); +#endif if (fl1 == 0) return (0); /* Invoke CPUID(1), return %edx; caller can examine bits to determine what's supported. */ - __asm__ ("push %%ecx ; push %%ebx ; cpuid ; pop %%ebx ; pop %%ecx" : "=d" (fl2) : "a" (1) : "cc"); +#ifdef __x86_64__ + __asm__ ("pushq %%rcx; pushq %%rbx; cpuid; popq %%rbx; popq %%rcx" + : "=d" (fl2), "=a" (fl1) : "1" (1) : "cc"); +#else + __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx" + : "=d" (fl2), "=a" (fl1) : "1" (1) : "cc"); +#endif return fl2; } - diff --git a/gcc/testsuite/gcc.dg/i386-sse-6.c b/gcc/testsuite/gcc.dg/i386-sse-6.c index ca18132ce30..6642891485b 100644 --- a/gcc/testsuite/gcc.dg/i386-sse-6.c +++ b/gcc/testsuite/gcc.dg/i386-sse-6.c @@ -1,6 +1,9 @@ /* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -msse2" } */ #include <xmmintrin.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #include "i386-cpuid.h" #ifndef NOINLINE @@ -11,26 +14,13 @@ typedef union { __m128i v; - unsigned long s[4]; + unsigned int s[4]; unsigned short int t[8]; unsigned long long u[2]; unsigned char c[16]; }vecInLong; -typedef union { - __m64 v; - unsigned char c[8]; - unsigned short int s[4]; - unsigned long long t; - unsigned int u[2]; -}vecInWord; - -void mmx_tests (void) NOINLINE; -void sse_tests (void) NOINLINE; void sse2_tests (void) NOINLINE; -void dump64_16 (char *, char *, vecInWord); -void dump64_32 (char *, char *, vecInWord); -void dump64_64 (char *, char *, vecInWord); void dump128_16 (char *, char *, vecInLong); void dump128_32 (char *, char *, vecInLong); void dump128_64 (char *, char *, vecInLong); @@ -42,35 +32,9 @@ char comparison[8000]; static int errors = 0; vecInLong a128, b128, c128, d128, e128, f128; -vecInWord a64, b64, c64, d64, e64; __m128i m128_16, m128_32, s128, m128_64, m128_128; __m64 m64_16, s64, m64_32, m64_64; -const char *reference_mmx[] = { - "_mm_srai_pi16 0012 0012 0012 0012 \n", - "_mm_sra_pi16 0012 0012 0012 0012 \n", - "_mm_srai_pi32 00123456 00123456 \n", - "_mm_sra_pi32 00123456 00123456 \n", - "_mm_srli_pi16 0012 0012 0012 0012 \n", - "_mm_srl_pi16 0012 0012 0012 0012 \n", - "_mm_srli_pi32 00123456 00123456 \n", - "_mm_srl_pi32 00123456 00123456 \n", - "_mm_srli_si64 00123456789abcde\n", - "_mm_srl_si64 00123456789abcde\n", - "_mm_slli_pi16 1230 1230 1230 1230 \n", - "_mm_sll_pi16 1230 1230 1230 1230 \n", - "_mm_slli_pi32 12345670 12345670 \n", - "_mm_sll_pi32 12345670 12345670 \n", - "_mm_slli_si64 123456789abcdef0\n", - "_mm_sll_si64 123456789abcdef0\n", - "" -}; - -const char *reference_sse[] = { - "_mm_shuffle_pi16 0123 4567 89ab cdef \n", - "" -}; - const char *reference_sse2[] = { "_mm_srai_epi16 0012 0012 0012 0012 0012 0012 0012 0012 \n", "_mm_sra_epi16 0012 0012 0012 0012 0012 0012 0012 0012 \n", @@ -98,12 +62,13 @@ const char *reference_sse2[] = { int main() { - unsigned long *p; unsigned long cpu_facilities; cpu_facilities = i386_cpuid (); - if (!cpu_facilities) /* If host has no vector support, pass. */ + if ((cpu_facilities & (bit_MMX | bit_SSE | bit_SSE2 | bit_CMOV)) + != (bit_MMX | bit_SSE | bit_SSE2 | bit_CMOV)) + /* If host has no vector support, pass. */ exit (0); a128.s[0] = 0x01234567; @@ -136,22 +101,6 @@ int main() m128_128 = e128.v; - d64.u[0] = 0x01234567; - d64.u[1] = 0x01234567; - - m64_32 = d64.v; - - e64.t = 0x0123456789abcdefULL; - - m64_64 = e64.v; - - a64.s[0] = 0x0123; - a64.s[1] = 0x0123; - a64.s[2] = 0x0123; - a64.s[3] = 0x0123; - - m64_16 = a64.v; - b128.s[0] = SHIFT; b128.s[1] = 0; b128.s[2] = 0; @@ -159,39 +108,6 @@ int main() s128 = b128.v; - b64.s[0] = SHIFT; - b64.s[1] = 0; - b64.s[2] = 0; - b64.s[3] = 0; - - s64 = b64.v; - - if (cpu_facilities & bit_MMX) - { - mmx_tests(); - check (buf, reference_mmx); -#ifdef DEBUG - printf ("mmx testing:\n"); - printf (buf); - printf ("\ncomparison:\n"); - printf (comparison); -#endif - buf[0] = '\0'; - } - - if (cpu_facilities & bit_SSE) - { - sse_tests(); - check (buf, reference_sse); -#ifdef DEBUG - printf ("sse testing:\n"); - printf (buf); - printf ("\ncomparison:\n"); - printf (comparison); -#endif - buf[0] = '\0'; - } - if (cpu_facilities & bit_SSE2) { sse2_tests(); @@ -211,66 +127,6 @@ int main() } void NOINLINE -mmx_tests (void) -{ - /* psraw */ - c64.v = _mm_srai_pi16 (m64_16, SHIFT); - dump64_16 (buf, "_mm_srai_pi16", c64); - c64.v = _mm_sra_pi16 (m64_16, s64); - dump64_16 (buf, "_mm_sra_pi16", c64); - - /* psrad */ - c64.v = _mm_srai_pi32 (m64_32, SHIFT); - dump64_32 (buf, "_mm_srai_pi32", c64); - c64.v = _mm_sra_pi32 (m64_32, s64); - dump64_32 (buf, "_mm_sra_pi32", c64); - - /* psrlw */ - c64.v = _mm_srli_pi16 (m64_16, SHIFT); - dump64_16 (buf, "_mm_srli_pi16", c64); - c64.v = _mm_srl_pi16 (m64_16, s64); - dump64_16 (buf, "_mm_srl_pi16", c64); - - /* psrld */ - c64.v = _mm_srli_pi32 (m64_32, SHIFT); - dump64_32 (buf, "_mm_srli_pi32", c64); - c64.v = _mm_srl_pi32 (m64_32, s64); - dump64_32 (buf, "_mm_srl_pi32", c64); - - /* psrlq */ - c64.v = _mm_srli_si64 (m64_64, SHIFT); - dump64_64 (buf, "_mm_srli_si64", c64); - c64.v = _mm_srl_si64 (m64_64, s64); - dump64_64 (buf, "_mm_srl_si64", c64); - - /* psllw */ - c64.v = _mm_slli_pi16 (m64_16, SHIFT); - dump64_16 (buf, "_mm_slli_pi16", c64); - c64.v = _mm_sll_pi16 (m64_16, s64); - dump64_16 (buf, "_mm_sll_pi16", c64); - - /* pslld */ - c64.v = _mm_slli_pi32 (m64_32, SHIFT); - dump64_32 (buf, "_mm_slli_pi32", c64); - c64.v = _mm_sll_pi32 (m64_32, s64); - dump64_32 (buf, "_mm_sll_pi32", c64); - - /* psllq */ - c64.v = _mm_slli_si64 (m64_64, SHIFT); - dump64_64 (buf, "_mm_slli_si64", c64); - c64.v = _mm_sll_si64 (m64_64, s64); - dump64_64 (buf, "_mm_sll_si64", c64); -} - -void NOINLINE -sse_tests (void) -{ - /* pshufw */ - c64.v = _mm_shuffle_pi16 (m64_64, 0x1b); - dump64_16 (buf, "_mm_shuffle_pi16", c64); -} - -void NOINLINE sse2_tests (void) { /* psraw */ @@ -345,52 +201,6 @@ sse2_tests (void) } void -dump64_16 (char *buf, char *name, vecInWord x) -{ - int i; - char *p = buf + strlen (buf); - - sprintf (p, "%s ", name); - p += strlen (p); - - for (i=0; i<4; i++) - { - sprintf (p, "%4.4x ", x.s[i]); - p += strlen (p); - } - strcat (p, "\n"); -} - -void -dump64_32 (char *buf, char *name, vecInWord x) -{ - int i; - char *p = buf + strlen (buf); - - sprintf (p, "%s ", name); - p += strlen (p); - - for (i=0; i<2; i++) - { - sprintf (p, "%8.8x ", x.u[i]); - p += strlen (p); - } - strcat (p, "\n"); -} - -void -dump64_64 (char *buf, char *name, vecInWord x) -{ - int i; - char *p = buf + strlen (buf); - - sprintf (p, "%s ", name); - p += strlen (p); - - sprintf (p, "%16.16llx\n", x.t); -} - -void dump128_16 (char *buf, char *name, vecInLong x) { int i; @@ -502,4 +312,5 @@ check (const char *input, const char *reference[]) *p_comparison = '\0'; strcat (p_comparison, new_errors ? "failure\n\n" : "O.K.\n\n") ; errors += new_errors; + return 0; } diff --git a/gcc/testsuite/gcc.dg/nest.c b/gcc/testsuite/gcc.dg/nest.c index 872feade581..264dde26f05 100644 --- a/gcc/testsuite/gcc.dg/nest.c +++ b/gcc/testsuite/gcc.dg/nest.c @@ -1,12 +1,9 @@ /* PR 5967, PR 7114 */ /* { dg-do run } */ -/* { dg-require-profiling "" } */ +/* { dg-require-profiling "-pg" } */ /* { dg-options "-O2 -pg" } */ /* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */ /* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */ -/* Support for -pg on irix relies on gcrt1.o which doesn't exist yet. - See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html */ -/* { dg-error "gcrt1.o" "Profiler support missing" { target mips*-*-irix* } 0 } */ /* { dg-error "-pg not supported" "Profiler support missing" { target *-*-sco3.2v5* } 0 } */ long foo (long x) diff --git a/gcc/testsuite/gcc.dg/pr14092-1.c b/gcc/testsuite/gcc.dg/pr14092-1.c index 86076c241e0..927ecf6aa3b 100644 --- a/gcc/testsuite/gcc.dg/pr14092-1.c +++ b/gcc/testsuite/gcc.dg/pr14092-1.c @@ -4,14 +4,17 @@ */ /* { dg-do compile } */ +/* Define this so that we are more portable. The testcase in the + PR failed on 64-bit hosts. */ +typedef int __attribute__ ((mode (__pointer__))) intptr_t; + typedef struct _PLCI { unsigned char x; unsigned char buf[1]; } PLCI; - void nl_ind(PLCI * plci) { - plci->x = -((int)(plci->buf)) & 3; + plci->x = -((intptr_t)(plci->buf)) & 3; } diff --git a/gcc/testsuite/gcc.dg/va-arg-1.c b/gcc/testsuite/gcc.dg/va-arg-1.c index a14823725da..ecd0e4d84bf 100644 --- a/gcc/testsuite/gcc.dg/va-arg-1.c +++ b/gcc/testsuite/gcc.dg/va-arg-1.c @@ -7,7 +7,7 @@ volatile int i; void foo() { - i = va_arg(v, char); /* { dg-warning "is promoted to|so you should" "char" } */ - i = va_arg(v, short); /* { dg-warning "is promoted to" "short" } */ - i = va_arg(v, float); /* { dg-warning "is promoted to" "float" } */ + i = va_arg(v, char); /* { dg-warning "is promoted to|so you should|abort" "char" } */ + i = va_arg(v, short); /* { dg-warning "is promoted to|abort" "short" } */ + i = va_arg(v, float); /* { dg-warning "is promoted to|abort" "float" } */ } diff --git a/gcc/testsuite/gcc.misc-tests/bprob.exp b/gcc/testsuite/gcc.misc-tests/bprob.exp index 5afbdb1c847..8fde6829f83 100644 --- a/gcc/testsuite/gcc.misc-tests/bprob.exp +++ b/gcc/testsuite/gcc.misc-tests/bprob.exp @@ -21,7 +21,7 @@ load_lib target-supports.exp # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. -if { ![check_profiling_available] } { +if { ![check_profiling_available "-fprofile-arcs"] } { return } diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 8ef6f6bc835..3c3cf19b4ce 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. load_lib dg.exp load_lib file-format.exp @@ -176,7 +176,7 @@ proc gcc-dg-runtest { testcases default-extra-flags } { global runtests foreach test $testcases { - # If we're only testing specific files and this isn't one of + # If we're only testing specific files and this isn't one of # them, skip it. if ![runtest_file_p $runtests $test] { continue @@ -227,7 +227,7 @@ proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } { global runtests foreach test $testcases { - # If we're only testing specific files and this isn't one of + # If we're only testing specific files and this isn't one of # them, skip it. if ![runtest_file_p $runtests $test] { continue @@ -238,7 +238,7 @@ proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } { foreach flags $DEBUG_TORTURE_OPTIONS { set doit 1 if { [string match {*/debug-[126].c} "$nshort"] \ - && [string match "*1" [lindex "$flags" 0] ] } { + && [string match "*1" [lindex "$flags" 0] ] } { set doit 0 } @@ -325,7 +325,7 @@ proc dg-require-gc-sections { args } { # If this target does not support profiling, skip this test. proc dg-require-profiling { args } { - if { ![ check_profiling_available ] } { + if { ![ check_profiling_available ${args} ] } { upvar dg-do-what dg-do-what set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] return @@ -334,7 +334,7 @@ proc dg-require-profiling { args } { # If this target does not support DLL attributes skip this test. -proc dg-require-dll { args } { +proc dg-require-dll { args } { global target_triplet # As a special case, the mcore-*-elf supports dllimport/dllexport. if { [string match "mcore-*-elf" $target_triplet] } { @@ -349,6 +349,15 @@ proc dg-require-dll { args } { set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] } +proc dg-require-iconv { args } { + if { ![ check_iconv_available ${args} ] } { + upvar dg-do-what dg-do-what + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] + return + } + return +} + # Prune any messages matching ARGS[1] (a regexp) from test output. proc dg-prune-output { args } { global additional_prunes diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp index cf414fb25cd..79d93cbf089 100644 --- a/gcc/testsuite/lib/scanasm.exp +++ b/gcc/testsuite/lib/scanasm.exp @@ -48,11 +48,14 @@ proc dg-scan { name positive testcase output_file orig_args } { set text [read $fd] close $fd - set match [regexp -- [lindex $orig_args 0] $text] + set pattern [lindex $orig_args 0] + set printable_pattern [string map {\t \\t \n \\n \r \\r \\ \\\\} $pattern] + + set match [regexp -- $pattern $text] if { $match == $positive } { - pass "$testcase $name [lindex $orig_args 0]" + pass "$testcase $name $printable_pattern" } else { - fail "$testcase $name [lindex $orig_args 0]" + fail "$testcase $name $printable_pattern" } } diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 33d72fd9520..ef2989043b3 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # gcc-patches@gcc.gnu.org @@ -31,13 +31,13 @@ proc check_weak_available { } { global target_cpu # All mips targets should support it - + if { [ string first "mips" $target_cpu ] >= 0 } { return 1 } # All solaris2 targets should support it - + if { [regexp ".*-solaris2.*" $target_triplet] } { return 1 } @@ -109,6 +109,7 @@ proc check_alias_available { } { # Compile a small test program. The definition of "g" is # necessary to keep the Solaris assembler from complaining # about the program. + puts $f "#ifdef __cplusplus\nextern \"C\"\n#endif\n" puts $f "void g() {} void f() __attribute__((alias(\"g\")));" close $f set lines [${tool}_target_compile "tmp.c" "tmp.o" object ""] @@ -138,7 +139,7 @@ proc check_alias_available { } { } } } - + verbose "check_alias_available returning $alias_available_saved" 2 } @@ -166,9 +167,32 @@ proc check_gc_sections_available { } { # Return true if profiling is supported on the target. -proc check_profiling_available { } { +proc check_profiling_available { test_what } { global profiling_available_saved + verbose "Profiling argument is <$test_what>" 1 + + # These conditions depend on the argument so examine them before + # looking at the cache variable. + + # Support for -p on solaris2 relies on mcrt1.o which comes with the + # vendor compiler. We cannot reliably predict the directory where the + # vendor compiler (and thus mcrt1.o) is installed so we can't + # necessarily find mcrt1.o even if we have it. + if { [istarget *-*-solaris2*] && [lindex $test_what 1] == "-p" } { + return 0 + } + + # Support for -p on irix relies on libprof1.a which doesn't appear to + # exist on any irix6 system currently posting testsuite results. + # Support for -pg on irix relies on gcrt1.o which doesn't exist yet. + # See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html + if { [istarget mips*-*-irix*] + && ([lindex $test_what 1] == "-p" || [lindex $test_what 1] == "-pg") } { + return 0 + } + + # Now examine the cache variable. if {![info exists profiling_available_saved]} { # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. @@ -177,13 +201,44 @@ proc check_profiling_available { } { || [istarget strongarm*-*-elf] || [istarget xscale*-*-elf] || [istarget cris-*-*] - || [istarget h8300-*-*] + || [istarget h8300-*-*] || [istarget *-*-windiss] } { set profiling_available_saved 0 } else { set profiling_available_saved 1 } } - + return $profiling_available_saved } + +# Return true if iconv is supported on the target. In particular IBM-1047. + +proc check_iconv_available { test_what } { + global tool + + set result "" + + verbose "check_iconv_available compiling testfile" 1 + set f [open "tmp.c" "w"] + # Compile a small test program. + puts $f "#include <iconv.h>\n" + puts $f "int main (void)\n {\n iconv_t cd; \n" + puts $f "cd = iconv_open (\"[lindex $test_what 1]\", \"UTF-8\");\n" + puts $f "if (cd == (iconv_t) -1)\n return 1;\n" + puts $f "return 0;\n}" + close $f + + set lines [${tool}_target_compile "tmp.c" "tmp.x" executable ""] + + set result [${tool}_load "./tmp.x" "" ""] + set status [lindex $result 0]; + + verbose "status is <$status>" + + if { $status == "pass" } then { + return 1 + } + + return 0 +} |