public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/44545]  New: internal compiler error: in remove_unreachable_handlers, at tree-eh
@ 2010-06-15 16:20 gxgjyyozme at zrmshffbt dot mine dot nu
  2010-06-15 16:22 ` [Bug tree-optimization/44545] " gxgjyyozme at zrmshffbt dot mine dot nu
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: gxgjyyozme at zrmshffbt dot mine dot nu @ 2010-06-15 16:20 UTC (permalink / raw)
  To: gcc-bugs

A combination of options can yield the error:
internal compiler error: in remove_unreachable_handlers, at tree-eh.c

To produce the error, g++ is invoked thus:
g++ -c -pipe --trapv --non-call-exceptions --stack-check -O2

Aside from -pipe and -O2, which can be further decomposed, the options are the
minimal set to produce the error in this case.

Build from 
URL: svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch
Repository Root: svn://gcc.gnu.org/svn/gcc
Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4
Revision: 160774

unset LDFLAGS
export CFLAGS=-pipe
export CXXFLAGS=-pipe
configure --enable-languages=c++
make bootstrap-lean

See attachment for source code of test case.
Taken from geany/scintilla.


-- 
           Summary: internal compiler error: in remove_unreachable_handlers,
                    at tree-eh
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gxgjyyozme at zrmshffbt dot mine dot nu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44545


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/44545] internal compiler error: in remove_unreachable_handlers, at tree-eh
  2010-06-15 16:20 [Bug tree-optimization/44545] New: internal compiler error: in remove_unreachable_handlers, at tree-eh gxgjyyozme at zrmshffbt dot mine dot nu
@ 2010-06-15 16:22 ` gxgjyyozme at zrmshffbt dot mine dot nu
  2010-06-16  9:07 ` [Bug tree-optimization/44545] [4.5/4.6 Regression] " rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: gxgjyyozme at zrmshffbt dot mine dot nu @ 2010-06-15 16:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from gxgjyyozme at zrmshffbt dot mine dot nu  2010-06-15 16:22 -------
Created an attachment (id=20917)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20917&action=view)
Instance of source code which causes crash.

from geany/scintilla


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44545


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/44545] [4.5/4.6 Regression] internal compiler error: in remove_unreachable_handlers, at tree-eh
  2010-06-15 16:20 [Bug tree-optimization/44545] New: internal compiler error: in remove_unreachable_handlers, at tree-eh gxgjyyozme at zrmshffbt dot mine dot nu
  2010-06-15 16:22 ` [Bug tree-optimization/44545] " gxgjyyozme at zrmshffbt dot mine dot nu
@ 2010-06-16  9:07 ` rguenth at gcc dot gnu dot org
  2010-06-16  9:31 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-16  9:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-06-16 09:07 -------
CallTip.cxx: In member function 'void CallTip::DrawChunk(Surface*, int&, const
char*, int, int, int, PRectangle, bool, bool)':
CallTip.cxx:87:6: error: control flow in the middle of basic block 64
CallTip.cxx:87:6: internal compiler error: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reducing.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to work|                            |4.4.4
   Last reconfirmed|0000-00-00 00:00:00         |2010-06-16 09:07:16
               date|                            |
            Summary|internal compiler error: in |[4.5/4.6 Regression]
                   |remove_unreachable_handlers,|internal compiler error: in
                   |at tree-eh                  |remove_unreachable_handlers,
                   |                            |at tree-eh
   Target Milestone|---                         |4.5.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44545


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/44545] [4.5/4.6 Regression] internal compiler error: in remove_unreachable_handlers, at tree-eh
  2010-06-15 16:20 [Bug tree-optimization/44545] New: internal compiler error: in remove_unreachable_handlers, at tree-eh gxgjyyozme at zrmshffbt dot mine dot nu
  2010-06-15 16:22 ` [Bug tree-optimization/44545] " gxgjyyozme at zrmshffbt dot mine dot nu
  2010-06-16  9:07 ` [Bug tree-optimization/44545] [4.5/4.6 Regression] " rguenth at gcc dot gnu dot org
@ 2010-06-16  9:31 ` rguenth at gcc dot gnu dot org
  2010-06-24 21:42 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-16  9:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-06-16 09:30 -------
class CallTip {
    int tabSize;
    int DrawChunk(int &x);
    int NextTabPos(int x);
};
int CallTip::NextTabPos(int x) 
{
    if (tabSize > 0) {
        x -= 5;
        x = (x + tabSize) / tabSize;
    }
}
int CallTip::DrawChunk(int &x) 
{
    const int numEnds = 10;
    int ends[numEnds + 2];
    return NextTabPos(x);
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44545


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/44545] [4.5/4.6 Regression] internal compiler error: in remove_unreachable_handlers, at tree-eh
  2010-06-15 16:20 [Bug tree-optimization/44545] New: internal compiler error: in remove_unreachable_handlers, at tree-eh gxgjyyozme at zrmshffbt dot mine dot nu
                   ` (2 preceding siblings ...)
  2010-06-16  9:31 ` rguenth at gcc dot gnu dot org
@ 2010-06-24 21:42 ` rguenth at gcc dot gnu dot org
  2010-06-29 22:04 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-24 21:42 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44545


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/44545] [4.5/4.6 Regression] internal compiler error: in remove_unreachable_handlers, at tree-eh
  2010-06-15 16:20 [Bug tree-optimization/44545] New: internal compiler error: in remove_unreachable_handlers, at tree-eh gxgjyyozme at zrmshffbt dot mine dot nu
                   ` (3 preceding siblings ...)
  2010-06-24 21:42 ` rguenth at gcc dot gnu dot org
@ 2010-06-29 22:04 ` pinskia at gcc dot gnu dot org
  2010-06-29 22:09 ` pinskia at gcc dot gnu dot org
  2010-07-31  9:35 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-06-29 22:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2010-06-29 22:04 -------
Reduced even further:
int DrawChunk(int *tabSize, int x) 
{
    const int numEnds = 10;
    int ends[numEnds + 2];
    if (*tabSize > 0) {
        x -= 5;
        x = (x + *tabSize) / *tabSize;
    }
}
--- CUT ---

Compile with -O2 -fstack-check  -fnon-call-exceptions  -ftrapv -fexceptions
(the last option is needed for C front-end).  As far as I can tell the
reassoication pass causes the ICE.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Keywords|                            |ice-on-valid-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44545


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/44545] [4.5/4.6 Regression] internal compiler error: in remove_unreachable_handlers, at tree-eh
  2010-06-15 16:20 [Bug tree-optimization/44545] New: internal compiler error: in remove_unreachable_handlers, at tree-eh gxgjyyozme at zrmshffbt dot mine dot nu
                   ` (4 preceding siblings ...)
  2010-06-29 22:04 ` pinskia at gcc dot gnu dot org
@ 2010-06-29 22:09 ` pinskia at gcc dot gnu dot org
  2010-07-31  9:35 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-06-29 22:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2010-06-29 22:09 -------
(gdb) p debug_bb_n(6)
;; basic block 6, loop depth 0, count 0
;; prev block 5, next block 7
;; pred:       5 [100.0%]  (fallthru,exec)
;; succ:       9 (eh,exec) 7 [100.0%]  (fallthru,exec)
<bb 6>:
D.1986_12 = D.1986_7;
x_10 = D.1986_7 + x_9(D);
D.1989_14 = x_10 + -5;


Yep, the assignment to x_10 can trap which means it can throw an exception
which reassociation needs to be corrected/turned off for non call exceptions
with trapv turned on.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44545


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/44545] [4.5/4.6 Regression] internal compiler error: in remove_unreachable_handlers, at tree-eh
  2010-06-15 16:20 [Bug tree-optimization/44545] New: internal compiler error: in remove_unreachable_handlers, at tree-eh gxgjyyozme at zrmshffbt dot mine dot nu
                   ` (5 preceding siblings ...)
  2010-06-29 22:09 ` pinskia at gcc dot gnu dot org
@ 2010-07-31  9:35 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-31  9:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2010-07-31 09:29 -------
GCC 4.5.1 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.1                       |4.5.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44545


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/44545] [4.5/4.6 regression] internal compiler error: in remove_unreachable_handlers, at tree-eh
       [not found] <bug-44545-4@http.gcc.gnu.org/bugzilla/>
  2010-11-16 11:52 ` [Bug tree-optimization/44545] [4.5/4.6 regression] " rguenth at gcc dot gnu.org
@ 2010-11-16 12:13 ` ebotcazou at gcc dot gnu.org
  1 sibling, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2010-11-16 12:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44545

--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-16 12:06:42 UTC ---
> Can't reproduce it on current trunk.  Looking at it on the branch.

Try -fstack-check=generic on the trunk.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/44545] [4.5/4.6 regression] internal compiler error: in remove_unreachable_handlers, at tree-eh
       [not found] <bug-44545-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-16 11:52 ` rguenth at gcc dot gnu.org
  2010-11-16 12:13 ` ebotcazou at gcc dot gnu.org
  1 sibling, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-16 11:52 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44545

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-16 11:48:10 UTC ---
Can't reproduce it on current trunk.  Looking at it on the branch.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-11-16 12:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-15 16:20 [Bug tree-optimization/44545] New: internal compiler error: in remove_unreachable_handlers, at tree-eh gxgjyyozme at zrmshffbt dot mine dot nu
2010-06-15 16:22 ` [Bug tree-optimization/44545] " gxgjyyozme at zrmshffbt dot mine dot nu
2010-06-16  9:07 ` [Bug tree-optimization/44545] [4.5/4.6 Regression] " rguenth at gcc dot gnu dot org
2010-06-16  9:31 ` rguenth at gcc dot gnu dot org
2010-06-24 21:42 ` rguenth at gcc dot gnu dot org
2010-06-29 22:04 ` pinskia at gcc dot gnu dot org
2010-06-29 22:09 ` pinskia at gcc dot gnu dot org
2010-07-31  9:35 ` rguenth at gcc dot gnu dot org
     [not found] <bug-44545-4@http.gcc.gnu.org/bugzilla/>
2010-11-16 11:52 ` [Bug tree-optimization/44545] [4.5/4.6 regression] " rguenth at gcc dot gnu.org
2010-11-16 12:13 ` ebotcazou at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).