Commit 820ecf56 by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

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
parent aa66aa5f
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.
......
// 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;
}
// 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);
......
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