[gnu.g++.bug] "on_exit" bug?

newton%cadillac.cad.mcc.com@MCC.COM (Dave Newton) (02/13/90)

Micheal,

The following code runs correctly "g++-1.36.1" but not on "g++-1.36.4".
The exit handler "test" does not seem to be invoked for "g++-1.36.4".
If this is difficult to fix a work around would be nice for the time
being.


#include <stream.h>

typedef void (*VFPI)();
typedef	char*	caddr_t;
extern "C" int on_exit(VFPI, caddr_t);

void test() {
  cout << "exiting " << "\n";
}

main() {
  on_exit(test, 0);
  exit(0);
}




[1.54]suntrek) g++-1.36.1 -v -g -o exiton exiton.cc
gcc version 1.36.1 (based on GCC 1.36)
 /usr/local/gnu/1.36/lib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 exiton.cc /usr/tmp/cca04583.cpp
GNU CPP version 1.36
 /usr/local/gnu/1.36/lib/gcc-cc1plus /usr/tmp/cca04583.cpp -quiet -dumpbase exiton.cc -g -version -o /usr/tmp/cca04583.s
GNU C++ version 1.36.1 (based on GCC 1.36) (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
 /usr/local/gnu/1.36/lib/gcc-as -mc68020 -o exiton.o /usr/tmp/cca04583.s
 /usr/local/gnu/1.36/lib/gcc-ld -o exiton -e start -dc -dp -Bstatic /lib/crt0.o /lib/Mcrt1.o exiton.o -lg++ /usr/local/gnu/1.36/lib/gcc-gnulib -lg -lc

[1.55]suntrek) exiton
exiting 



[1.56]suntrek) g++-1.36.4 -v -g -o exiton exiton.cc
g++ version 1.36.4 (based on GCC 1.36.93)
 /usr/local/gnu/1.36.4/lib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 exiton.cc /usr/tmp/cca04589.cpp
GNU CPP version 1.36.92
 /usr/local/gnu/1.36.4/lib/gcc-cc1plus /usr/tmp/cca04589.cpp -quiet -dumpbase exiton.cc -g -version -o /usr/tmp/cca04589.s
GNU C++ version 1.36.4 (based on GCC 1.36.93) (68k, MIT syntax) compiled by GNU C version 1.36.92.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
 /usr/local/gnu/1.36.4/lib/gcc-as -mc68020 -o exiton.o /usr/tmp/cca04589.s
 /usr/local/gnu/1.36.4/lib/gcc-ld -o exiton -e start -dc -dp -Bstatic /lib/crt0.o /lib/Mcrt1.o exiton.o -lg++ /usr/local/gnu/1.36.4/lib/gcc-gnulib -lg -lc -lg -L/usr/lib/f68881

[1.57]suntrek) exiton
[1.58]suntrek) 

fox@allegra.tempo.nj.att.com (David Fox) (02/13/90)

> The following code runs correctly "g++-1.36.1" but not on "g++-1.36.4".
> The exit handler "test" does not seem to be invoked for "g++-1.36.4".

On a possibly related topic, profiling no longer seems to work 
in 1.36.4, whereas it did in 1.36.2.

-david