From: Robert Lipe Date: Fri, 21 Nov 1997 17:12:52 +0000 (+0000) Subject: * i386/sco5.h (HAVE_ATEXIT): Revert last change. X-Git-Tag: releases/egcs-1.0.0~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16683156e167ff962c74d9a9c191d7641c4b687f;p=thirdparty%2Fgcc.git * i386/sco5.h (HAVE_ATEXIT): Revert last change. From-SVN: r16640 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1f9219c86567..56797ef653ea 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Fri Nov 21 10:13:11 1997 Robert Lipe (robertl@dgii.com) + + * i386/sco5.h (HAVE_ATEXIT): Revert last change. + Thu Nov 20 16:11:50 1997 Richard Henderson * alpha.c (alpha_emit_set_const_1): Handle narrow hosts better. diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h index 79bc4c5a6327..8a0eb0b6772f 100644 --- a/gcc/config/i386/sco5.h +++ b/gcc/config/i386/sco5.h @@ -945,6 +945,7 @@ compiler at the end of the day. Onward we go ... # if defined (_SCO_ELF) # define OBJECT_FORMAT_ELF +# define HAVE_ATEXIT 1 # define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_ELF # define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_ELF # define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_ELF diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p9732b.C b/gcc/testsuite/g++.old-deja/g++.mike/p9732b.C index aadb374b996d..eabc9f2760d4 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p9732b.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p9732b.C @@ -1,42 +1,2 @@ -// prms-id: 9732 - -int count; -int bail = 0; - -struct base { - base () { ++count; } - ~base () { --count; } - base(const base&o) { ++count; } -}; - -class D { -public: - ~D() { - if (bail++) - { - // On some Linux boxes, we run the dtor for d twice, - // once before exit, and once after! - abort (); - } - else - { - if (count != 0) - exit (1); - exit (0); - } - } -} d; - -base base_object; - -base base_returning_function (); - -const base& base_ref = base_returning_function (); - -int main () { -} - -base base_returning_function () { - base local_base_object; - return local_base_object; -} + _exit (1); + _exit (0);