From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1376 invoked by alias); 23 Aug 2006 15:20:35 -0000 Received: (qmail 1335 invoked by uid 48); 23 Aug 2006 15:20:24 -0000 Date: Wed, 23 Aug 2006 15:20:00 -0000 Message-ID: <20060823152024.1334.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/28764] [4.2 Regression] libjava build failure on sh4 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "amylaar at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-08/txt/msg01956.txt.bz2 List-Id: ------- Comment #4 from amylaar at gcc dot gnu dot org 2006-08-23 15:20 ------- As far as I can see, the only reason why we can have a REG_EH_REGION note on a non-call instruction is when the instruction may trap, and we compile with -fnon-call-exceptions. (In reply to comment #3) > Here is a workaround. Although it doesn't solve the issue > completely, it'd be better than nothing. It prevents to > insert the mode switching code after the last insn of BB > when that insn has the REG_EH_REGION note. I think you can get an incorect mode this way, when the fall-thorough path is supposed to have a different mode than the abnormal edge destination. In fact, if the modes were the same, and not in conflict with the last insn of the source BB, LCM would be expected to place the mode switch into the source block or even earlier in the flow graph. I think the only sane way to handle this is not to emit any mode switching code for exception edges at the potential trapping site, and make the exception handling code assume no particular mode is present (unless the compiler can prove that an exception handler can only be reached from throwing/trapping sites that all have the same mode). > It also checks > if the last insn needs a mode which doesn't match with > the mode given by the mode switching code in such case. If HONOR_SNANS of flag_trapping_math is active together with -fnon-call-exceptions, such problems can be expected for floating point operations. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28764