diff options
author | Richard Sandiford <richard@codesourcery.com> | 2008-04-09 09:13:23 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2008-04-09 09:13:23 +0000 |
commit | c6fee2278be28235116e38574cc5078e2d0a7289 (patch) | |
tree | b08e1bf9784d40ea282946b3d1d39753e51ca9a6 | |
parent | 24722ea98e979fd3c7a0e82c8f422544fa5cd947 (diff) | |
download | gcc-c6fee2278be28235116e38574cc5078e2d0a7289.zip gcc-c6fee2278be28235116e38574cc5078e2d0a7289.tar.gz gcc-c6fee2278be28235116e38574cc5078e2d0a7289.tar.bz2 |
target-supports.exp (check_effective_target_vxworks_kernel): Fix comment.
* lib/target-supports.exp (check_effective_target_vxworks_kernel):
Fix comment.
(check_effective_target_vxworks_rtp): New procedure.
* g++.dg/opt/20050511-1.C: Rename UINT32 for VxWorks kernel mode.
* g++.dg/warn/miss-format-1.C: XFAIL for VxWorks.
* g++.old-deja/g++.abi/cxa_vec.C: XFAIL for VxWorks kernels.
* g++.old-deja/g++.brendan/new3.C: Likewise.
* g++.old-deja/g++.eh/badalloc1.C: XFAIL for VxWorks RTPs.
* g++.old-deja/g++.law/missed-error2.C: Undefine max for
VxWorks kernel mode.
* g++.old-deja/g++.mike/init1.C: XFAIL for VxWorks kernel mode.
* g++.old-deja/g++.mike/p2736.C: Likewise.
* g++.old-deja/g++.mike/p658.C: Undefine OK for VxWorks kernel mode.
* g++.old-deja/g++.other/headers1.C: Likewise min and max.
* g++.old-deja/g++.robertl/eb79.C: Undefine max for VxWorks
kernel mode.
From-SVN: r134134
-rw-r--r-- | gcc/testsuite/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/opt/20050511-1.C | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/warn/miss-format-1.C | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.brendan/new3.C | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.law/missed-error2.C | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.mike/init1.C | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.mike/p2736.C | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.mike/p658.C | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/headers1.C | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.robertl/eb79.C | 6 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 12 |
13 files changed, 85 insertions, 8 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4960161..008bc86 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,22 @@ +2008-04-09 Richard Sandiford <richard@codesourcery.com> + + * lib/target-supports.exp (check_effective_target_vxworks_kernel): + Fix comment. + (check_effective_target_vxworks_rtp): New procedure. + * g++.dg/opt/20050511-1.C: Rename UINT32 for VxWorks kernel mode. + * g++.dg/warn/miss-format-1.C: XFAIL for VxWorks. + * g++.old-deja/g++.abi/cxa_vec.C: XFAIL for VxWorks kernels. + * g++.old-deja/g++.brendan/new3.C: Likewise. + * g++.old-deja/g++.eh/badalloc1.C: XFAIL for VxWorks RTPs. + * g++.old-deja/g++.law/missed-error2.C: Undefine max for + VxWorks kernel mode. + * g++.old-deja/g++.mike/init1.C: XFAIL for VxWorks kernel mode. + * g++.old-deja/g++.mike/p2736.C: Likewise. + * g++.old-deja/g++.mike/p658.C: Undefine OK for VxWorks kernel mode. + * g++.old-deja/g++.other/headers1.C: Likewise min and max. + * g++.old-deja/g++.robertl/eb79.C: Undefine max for VxWorks + kernel mode. + 2008-04-09 Jakub Jelinek <jakub@redhat.com> * gfortran.dg/namelist_47.f90: New test. diff --git a/gcc/testsuite/g++.dg/opt/20050511-1.C b/gcc/testsuite/g++.dg/opt/20050511-1.C index 2fbd3e1..a892903 100644 --- a/gcc/testsuite/g++.dg/opt/20050511-1.C +++ b/gcc/testsuite/g++.dg/opt/20050511-1.C @@ -4,6 +4,11 @@ #include <stdio.h> #include <stdlib.h> +// The VxWorks kernel headers define their own UINT32 +#if defined __vxworks && !defined __RTP__ +#define UINT32 my_UINT32 +#endif + typedef signed short SINT16 ; typedef unsigned long UINT32 ; typedef unsigned int UINT ; diff --git a/gcc/testsuite/g++.dg/warn/miss-format-1.C b/gcc/testsuite/g++.dg/warn/miss-format-1.C index 56a5c7b..ec9dbc1 100644 --- a/gcc/testsuite/g++.dg/warn/miss-format-1.C +++ b/gcc/testsuite/g++.dg/warn/miss-format-1.C @@ -2,7 +2,8 @@ /* Origin: Joseph Myers <jsm28@cam.ac.uk> */ /* { dg-do compile } */ /* { dg-options "-Wmissing-format-attribute" } */ -/* { dg-error "not declared" "" { target *-*-solaris2.5.1 *-*-solaris2.[5-8] } 24 } */ +/* VxWorks does not provide vscanf, either in kernel or RTP mode. */ +/* { dg-error "not declared" "" { target *-*-solaris2.5.1 *-*-solaris2.[5-8] *-*-vxworks* } 25 } */ #include <stdio.h> #include <stdarg.h> @@ -21,7 +22,7 @@ bar (const char *fmt, ...) { va_list ap; va_start (ap, fmt); - vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-solaris2.5.1 *-*-solaris2.[5-8] } } */ + vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-solaris2.5.1 *-*-solaris2.[5-8] *-*-vxworks* } } */ va_end (ap); } diff --git a/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C b/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C index 7be9185..5370fb8 100644 --- a/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C +++ b/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C @@ -1,4 +1,9 @@ -// { dg-do run { xfail powerpc-ibm-aix* } } +// This test fails on VxWorks in kernel mode because it depends on the +// library version of "::operator new[]" calling the "::operator new" +// defined in this module. This doesn't work because the library version +// of "::operator new[]" is built into the kernel itself; library relocations +// are resolved when the kernel is linked. +// { dg-do run { xfail { powerpc-ibm-aix* || vxworks_kernel } } } // { dg-options "-flat_namespace" { target *-*-darwin[67]* } } // Test __cxa_vec routines // Copyright (C) 2000, 2005 Free Software Foundation, Inc. diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/new3.C b/gcc/testsuite/g++.old-deja/g++.brendan/new3.C index b5bfb4a..791d00b 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/new3.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/new3.C @@ -1,4 +1,9 @@ -// { dg-do run { xfail powerpc-ibm-aix* } } +// This test fails on VxWorks in kernel mode because it depends on the +// library version of "::operator new[]" calling the "::operator new" +// defined in this module. This doesn't work because the library version +// of "::operator new[]" is built into the kernel itself; library relocations +// are resolved when the kernel is linked. +// { dg-do run { xfail { powerpc-ibm-aix* || vxworks_kernel } } } // { dg-options "-flat_namespace" { target *-*-darwin[67]* } } // GROUPS passed operator-new #include <stdio.h> diff --git a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C index 3c9941d..b2e7f62 100644 --- a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C +++ b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C @@ -1,4 +1,8 @@ -// { dg-do run { xfail xstormy16-*-* *-*-darwin[1-7]* } } +// This fails for VxWorks RTPs because the initialization of +// __cxa_allocate_exception's emergency buffer mutex will +// itself call malloc(), and will fail if there is no more +// memory available. +// { dg-do run { xfail { { xstormy16-*-* *-*-darwin[1-7]* } || vxworks_rtp } } } // Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 6 June 2000 <nathan@codesourcery.com> diff --git a/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C b/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C index d9d6195..a26f456 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C +++ b/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C @@ -8,6 +8,12 @@ #include <iostream> +// The VxWorks kernel-mode headers define a macro named "max", which is not +// ISO-compliant, but is part of the VxWorks API. +#if defined __vxworks && !defined __RTP__ +#undef max +#endif + inline int max(int a, int b) {return a > b ? a : b;}; // { dg-error "" } candidate inline double max(double a, double b) {return a > b ? a : b;}; // { dg-error "" } candidate diff --git a/gcc/testsuite/g++.old-deja/g++.mike/init1.C b/gcc/testsuite/g++.old-deja/g++.mike/init1.C index 0b47fb7e..5bc1ea4 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/init1.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/init1.C @@ -1,4 +1,6 @@ -// { dg-do run } +// The VxWorks kernel has no implementation of atexit, so local statics +// are never destroyed. +// { dg-do run { xfail vxworks_kernel } } int count; extern "C" void _exit(int); diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p2736.C b/gcc/testsuite/g++.old-deja/g++.mike/p2736.C index a0a8b31..6ae61e8 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p2736.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p2736.C @@ -1,4 +1,6 @@ -// { dg-do run } +// The VxWorks kernel has no implementation of atexit, so local statics +// are never destroyed. +// { dg-do run { xfail vxworks_kernel } } // This is a poor test case, it is meant to ensure that function local // statics are destroyed at the right time. See PR 2736 for details. // prms-id: 2736 diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p658.C b/gcc/testsuite/g++.old-deja/g++.mike/p658.C index 1a4fefd..8fc7cd5 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p658.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p658.C @@ -12,6 +12,12 @@ #define TRUE true #endif +// The VxWorks kernel-mode headers define a macro named "OK", which is not +// ISO-compliant, but is part of the VxWorks API. +#if defined __vxworks && !defined __RTP__ +#undef OK +#endif + class Object { public: Object(); diff --git a/gcc/testsuite/g++.old-deja/g++.other/headers1.C b/gcc/testsuite/g++.old-deja/g++.other/headers1.C index 31de355..1080fe3 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/headers1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/headers1.C @@ -44,6 +44,12 @@ #include <string> #include <typeinfo> #include <utility> +// The VxWorks kernel-mode headers define macros named "max" and +// "min", which is not ISO-compliant, but is part of the VxWorks API. +#if defined __vxworks && !defined __RTP__ +#undef max +#undef min +#endif #include <valarray> #include <vector> diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C index e5905ff..8d1c94d 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C @@ -2,6 +2,12 @@ // Makes bogus x86 assembly code. #include <iostream> +// The VxWorks kernel-mode headers define a macro named "max", which is not +// ISO-compliant, but is part of the VxWorks API. +#if defined __vxworks && !defined __RTP__ +#undef max +#endif + using namespace std; template<class T> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 2d506434..c1bdc79 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2221,7 +2221,7 @@ proc check_effective_target_simulator { } { return 0 } -# Return 1 if the target is a VxWorks RTP. +# Return 1 if the target is a VxWorks kernel. proc check_effective_target_vxworks_kernel { } { return [check_no_compiler_messages vxworks_kernel assembly { @@ -2231,6 +2231,16 @@ proc check_effective_target_vxworks_kernel { } { }] } +# Return 1 if the target is a VxWorks RTP. + +proc check_effective_target_vxworks_rtp { } { + return [check_no_compiler_messages vxworks_rtp assembly { + #if !defined __vxworks || !defined __RTP__ + #error NO + #endif + }] +} + # Return 1 if the target is expected to provide wide character support. proc check_effective_target_wchar { } { |