diff options
author | Hans-Peter Nilsson <hp@bitrange.com> | 2002-03-31 15:49:29 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2002-03-31 15:49:29 +0000 |
commit | 820ecf563c5338d9978908e4e8fe8cd8a3313d87 (patch) | |
tree | 01f45ca401d3550690e6489d7e35c6ee5565dca2 /gcc | |
parent | aa66aa5ff4304776eacd3537da2fe6554eba5112 (diff) | |
download | gcc-820ecf563c5338d9978908e4e8fe8cd8a3313d87.zip gcc-820ecf563c5338d9978908e4e8fe8cd8a3313d87.tar.gz gcc-820ecf563c5338d9978908e4e8fe8cd8a3313d87.tar.bz2 |
static11.C: Skip on mmix-knuth-mmixware.
* g++.old-deja/g++.pt/static11.C: Skip on mmix-knuth-mmixware.
* g++.dg/other/static11.C: Copy g++.old-deja/g++.pt/static11.C for
-da test.
From-SVN: r51656
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/static11.C | 32 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/static11.C | 6 |
3 files changed, 44 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cec193e..8015ae9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2002-03-31 Hans-Peter Nilsson <hp@bitrange.com> + + * g++.old-deja/g++.pt/static11.C: Skip on mmix-knuth-mmixware. + * g++.dg/other/static11.C: Copy g++.old-deja/g++.pt/static11.C for + -da test. + 2002-03-31 Richard Henderson <rth@redhat.com> * gcc.dg/special/alias-2.c: New. diff --git a/gcc/testsuite/g++.dg/other/static11.C b/gcc/testsuite/g++.dg/other/static11.C new file mode 100644 index 0000000..08126f1 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/static11.C @@ -0,0 +1,32 @@ +// This is a copy of g++.old-deja/g++.pt/static11.C which at one +// time got a SEGV for mmix-knuth-mmixware when compiled with +// -da (or either -dj or -df). +// { dg-do compile } +// { dg-options "-da" } + +extern "C" void _exit (int); + +int r = 1; + +struct A +{ + void f(){}; + A(){ ++r; } + ~A(){ r -= 2; _exit (r); } +}; + +template<class T> +struct C +{ + C(){ a.f(); } + static A a; +}; + +template <class T> A C<T>::a; +typedef C<int> B; + +int main() +{ + C<int> c; + return r; +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/static11.C b/gcc/testsuite/g++.old-deja/g++.pt/static11.C index 07e6fd7..cb8a524 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/static11.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/static11.C @@ -1,5 +1,11 @@ // Bug: g++ was failing to destroy C<int>::a because it was using two // different sentry variables for construction and destruction. +// +// Some targets (e.g. those with "set_board_info needs_status_wrapper 1" +// in their dejagnu baseboard description) require that the status is +// final when exit is entered (or main returns), and not "overruled" by a +// destructor calling _exit. It's not really worth it to handle that. +// Skip if target: mmix-knuth-mmixware extern "C" void _exit (int); |