Commit c6fee227 by Richard Sandiford Committed by Nathan Sidwell

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
parent 24722ea9
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> 2008-04-09 Jakub Jelinek <jakub@redhat.com>
* gfortran.dg/namelist_47.f90: New test. * gfortran.dg/namelist_47.f90: New test.
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.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 signed short SINT16 ;
typedef unsigned long UINT32 ; typedef unsigned long UINT32 ;
typedef unsigned int UINT ; typedef unsigned int UINT ;
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */ /* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-Wmissing-format-attribute" } */ /* { 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 <stdio.h>
#include <stdarg.h> #include <stdarg.h>
...@@ -21,7 +22,7 @@ bar (const char *fmt, ...) ...@@ -21,7 +22,7 @@ bar (const char *fmt, ...)
{ {
va_list ap; va_list ap;
va_start (ap, fmt); 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); va_end (ap);
} }
......
// { 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]* } } // { dg-options "-flat_namespace" { target *-*-darwin[67]* } }
// Test __cxa_vec routines // Test __cxa_vec routines
// Copyright (C) 2000, 2005 Free Software Foundation, Inc. // Copyright (C) 2000, 2005 Free Software Foundation, Inc.
......
// { 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]* } } // { dg-options "-flat_namespace" { target *-*-darwin[67]* } }
// GROUPS passed operator-new // GROUPS passed operator-new
#include <stdio.h> #include <stdio.h>
......
// { 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. // Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 6 June 2000 <nathan@codesourcery.com> // Contributed by Nathan Sidwell 6 June 2000 <nathan@codesourcery.com>
......
...@@ -8,6 +8,12 @@ ...@@ -8,6 +8,12 @@
#include <iostream> #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 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 inline double max(double a, double b) {return a > b ? a : b;}; // { dg-error "" } candidate
......
// { 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; int count;
extern "C" void _exit(int); extern "C" void _exit(int);
......
// { 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 // 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. // statics are destroyed at the right time. See PR 2736 for details.
// prms-id: 2736 // prms-id: 2736
......
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
#define TRUE true #define TRUE true
#endif #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 { class Object {
public: public:
Object(); Object();
......
...@@ -44,6 +44,12 @@ ...@@ -44,6 +44,12 @@
#include <string> #include <string>
#include <typeinfo> #include <typeinfo>
#include <utility> #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 <valarray>
#include <vector> #include <vector>
......
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
// Makes bogus x86 assembly code. // Makes bogus x86 assembly code.
#include <iostream> #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; using namespace std;
template<class T> template<class T>
......
...@@ -2221,7 +2221,7 @@ proc check_effective_target_simulator { } { ...@@ -2221,7 +2221,7 @@ proc check_effective_target_simulator { } {
return 0 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 { } { proc check_effective_target_vxworks_kernel { } {
return [check_no_compiler_messages vxworks_kernel assembly { return [check_no_compiler_messages vxworks_kernel assembly {
...@@ -2231,6 +2231,16 @@ proc check_effective_target_vxworks_kernel { } { ...@@ -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. # Return 1 if the target is expected to provide wide character support.
proc check_effective_target_wchar { } { proc check_effective_target_wchar { } {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment