From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4951 invoked by alias); 19 Nov 2008 18:52:46 -0000 Received: (qmail 29745 invoked by uid 48); 19 Nov 2008 18:51:17 -0000 Date: Wed, 19 Nov 2008 18:52:00 -0000 Message-ID: <20081119185117.29744.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug other/37463] [4.4 regression] All Solaris/x86 eh tests fail In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ebotcazou at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-11/txt/msg01578.txt.bz2 ------- Comment #13 from ebotcazou at gcc dot gnu dot org 2008-11-19 18:51 ------- > I'm a bit unsure how to test this right now: what I find is that C objects > have read-only .eh_frame sections and use .cfi* directives, while C++, Java > and Ada objects have read-write .eh_frame sections and still use .eh_frame > sections directly emitted by the compiler. The decision is made in dwarf2out_do_cfi_asm: /* Decide whether to emit frame unwind via assembler directives. */ int dwarf2out_do_cfi_asm (void) { int enc; #ifdef MIPS_DEBUGGING_INFO return false; #endif if (!flag_dwarf2_cfi_asm || !dwarf2out_do_frame ()) return false; if (!eh_personality_libfunc) return true; if (!HAVE_GAS_CFI_PERSONALITY_DIRECTIVE) return false; /* Make sure the personality encoding is one the assembler can support. In particular, aligned addresses can't be handled. */ enc = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/2,/*global=*/1); if ((enc & 0x70) != 0 && (enc & 0x70) != DW_EH_PE_pcrel) return false; enc = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0,/*global=*/0); if ((enc & 0x70) != 0 && (enc & 0x70) != DW_EH_PE_pcrel) return false; return true; } On Solaris with Sun ld, ASM_PREFERRED_EH_DATA_FORMAT is defined so that at least one of the 2 tests will always return false. Therefore the only way to have dwarf2out_do_cfi_asm return true is if (!eh_personality_libfunc) return true; The C++, Java and Ada compilers unconditionally register their personality routine, whereas the C compiler doesn't, even with -fexceptions: if there is no EH action in the code, it doesn't register it. Hence the discrepancy. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37463