From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Lipe To: egcs@cygnus.com Subject: init1.C failure under study Date: Sat, 29 Nov 1997 09:29:00 -0000 Message-id: <19971129112737.14113@dgii.com> X-SW-Source: 1997-11/msg00955.html This test works on OpenServer ELF, but not COFF. Whether this is something in the way sco5.h handles initializers, I can't tell. If I remove the word 'static' in the function f, this test passes under COFF. It also makes more of a difference in the assembly than I'd have guessed. This is one of only two g++ tests (p2736.C is the other)that fails in COFF that doesn't fail in ELF. Are there any other x86 COFF targets represented on the list? Can anyone offer good hints where to look? I stated earlier that this started failing around 1101. That is incorrect. I just fixed the test fixture on 1101 and the earlier results were the ones that printed "-mcoff" on the headers but never bothered to pass it down to GCC. So this problem likely has tenure. Thanx, RJL int count; extern "C" void _exit(int); struct C { ~C() { if (count != 1) _exit(1); } } c; class A { public: ~A () { ++count; } }; void f() { static A a; } void g() { // Since this isn't constructed, we can't destruct it. static A a; } int main () { f(); }