This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C++ exception handling broken if parts of libgcc are compiled using `-fomit-frame-pointer´
- To: gcc-bugs at gcc dot gnu dot org
- Subject: C++ exception handling broken if parts of libgcc are compiled using `-fomit-frame-pointer´
- From: Manfred Hollstein <manfredh at redhat dot com>
- Date: Sat, 19 Aug 2000 12:42:31 +0200 (MEST)
- CC: gcc at gcc dot gnu dot org
- Reply-To: Manfred Hollstein <manfred dot h at gmx dot net>
Hi there,
Yesterday I ran "make bootstrap check" on i686-redhat6-linux-gnu
several times on the same sources, each time using different
BOOT_CFLAGS. It turned out, that if `-fomit-frame-pointer´ (FOFP) is
used, 8 additional failures in the g++ testsuite show up:
FAIL: g++.eh/spec2.C Execution test
FAIL: g++.eh/spec3.C Execution test
FAIL: g++.eh/spec4.C Execution test
FAIL: g++.mike/dyncast1.C Execution test
FAIL: g++.mike/dyncast2.C Execution test
FAIL: g++.mike/eh33.C Execution test
FAIL: g++.mike/eh50.C Execution test
FAIL: g++.mike/eh51.C Execution test
IIRC, somebody mentioned that the current exception handling mechanism
doesn't work if the FOFP flag is used. So I rebuilt those parts of
libgcc.a, which depend on proper frame handling, this time using
`-fno-omit-frame-pointer´, and replaced those modules in libgcc.a.
Running the tests, which formerly crashed, terminated successfully now.
So, my question is:
`Is "-fomit-frame-pointer" plus exception handling deprecated in
general, or just on those platforms which are using the DWARF2
unwinder?´
If the latter is true, I'd suggest we reset flag_omit_frame_pointer in
toplev.c emitting a suitable warning like this:
#if DWARF2_UNWIND_INFO
if (flag_omit_frame_pointer && flag_exceptions)
{
warning ("-fomit-frame-pointer is incompatible with the exception handling mechanism on this target; disabling it");
flag_omit_frame_pointer = 0;
}
#endif
If this isn't the way to go, we need to find a way to make sure,
libgcc.a will be generated properly regardless of BOOT_CFLAGS,
however.
Thoughts?
Cheers, manfred.