Bug 23676 - [4.1 Regression] ICE: "missing REG_EH_REGION note in the end of bb"
Summary: [4.1 Regression] ICE: "missing REG_EH_REGION note in the end of bb"
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Richard Henderson
URL:
Keywords: build, EH, ice-checking, ice-on-valid-code, wrong-code
: 23696 23712 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-01 11:44 UTC by Andrew Pinski
Modified: 2005-09-03 11:49 UTC (History)
4 users (show)

See Also:
Host:
Target: powerpc-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-09-01 16:08:38


Attachments
testcase (22.01 KB, text/plain)
2005-09-02 22:31 UTC, Kazumoto Kojima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2005-09-01 11:44:01 UTC
The following is reduced from the report here:
http://gcc.gnu.org/ml/gcc-regression/2005-09/msg00002.html
cc1plus -fnon-call-exceptions t.cc is all that needed to reproduce the bug.

----
struct JvSynchronize {
  ~JvSynchronize ();
};
struct _Jv_Field {
  char* addr;
};
_Jv_Field * resolve_pool_entry (void);
void * _Jv_ResolvePoolEntry (void)
{
  JvSynchronize sync;
  return (resolve_pool_entry ())->addr;
}
-----
Comment 1 Andrew Pinski 2005-09-01 12:01:25 UTC
A little more reduced:
struct JvSynchronize {
  ~JvSynchronize ();
};
char* * resolve_pool_entry (void);
void * _Jv_ResolvePoolEntry (void)
{
  JvSynchronize sync;
  return *(resolve_pool_entry ());
}
Comment 2 Richard Henderson 2005-09-01 16:08:37 UTC
Also reprodicible on ppc-linux.
Comment 3 GCC Commits 2005-09-01 23:35:29 UTC
Subject: Bug 23676

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2005-09-01 23:35:20

Modified files:
	gcc            : ChangeLog reload1.c rtlanal.c 

Log message:
	PR 23676
	* reload1.c (reload_as_needed): Check !CALL_P before calling
	fixup_eh_region_note.
	* rtlanal.c (may_trap_p): SUBREG by itself cannot trap.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9878&r2=2.9879
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload1.c.diff?cvsroot=gcc&r1=1.480&r2=1.481
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/rtlanal.c.diff?cvsroot=gcc&r1=1.218&r2=1.219

Comment 4 Richard Henderson 2005-09-01 23:38:04 UTC
Fixed.
Comment 5 Andrew Pinski 2005-09-02 15:53:32 UTC
*** Bug 23696 has been marked as a duplicate of this bug. ***
Comment 6 Kazumoto Kojima 2005-09-02 22:31:19 UTC
Created attachment 9654 [details]
testcase

There is yet another "missing REG_EH_REGION note in the end of bb"
ICE for sh4-unknown-linux-gnu during libjava build.  I've attached
a reduced preprocessed file, though it could be a new PR.
Comment 7 Andrew Pinski 2005-09-02 22:52:48 UTC
(In reply to comment #6)
> Created an attachment (id=9654)
> testcase
> 
> There is yet another "missing REG_EH_REGION note in the end of bb"
> ICE for sh4-unknown-linux-gnu during libjava build.  I've attached
> a reduced preprocessed file, though it could be a new PR.

Please file a new bug, as this is more likely a target bug.
Comment 8 Richard Henderson 2005-09-02 22:54:11 UTC
Subject: Re:  [4.1 Regression] ICE: "missing REG_EH_REGION note in the end of bb"

On Fri, Sep 02, 2005 at 10:31:21PM -0000, kkojima at gcc dot gnu dot org wrote:
> There is yet another "missing REG_EH_REGION note in the end of bb"
> ICE for sh4-unknown-linux-gnu during libjava build.  I've attached
> a reduced preprocessed file, though it could be a new PR.

It's a different problem.  According to the backtrace, this happens
in optimize_mode_switching, and not in reload at all.  I'll look at
it, but please file it as a new bug.


r~
Comment 9 Kazumoto Kojima 2005-09-02 23:35:42 UTC
I've filed a PR 23706 for it.

Comment 10 Andrew Pinski 2005-09-03 11:49:50 UTC
*** Bug 23712 has been marked as a duplicate of this bug. ***