public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35149]  New: ICE: in expand_call_inline, at tree-inline.c:2653
@ 2008-02-09 19:09 p dot vanhoof at oma dot be
  2008-02-09 19:12 ` [Bug c++/35149] " p dot vanhoof at oma dot be
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: p dot vanhoof at oma dot be @ 2008-02-09 19:09 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]

When the attached code is compiled with

g++ -finline -DBOUNDS_CHECK -c ion_recomb_Badnell.ii

you get

/usr/local/gcc430/lib/gcc/x86_64-unknown-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/basic_string.h:
In member function ‘T& n_pointer<T, d, 1, ARPA_TYPE, true>::operator[](size_t)
const [with T = t_quantumState, int d = 3]’:
/usr/local/gcc430/lib/gcc/x86_64-unknown-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/basic_string.h:494:
internal compiler error: in expand_call_inline, at tree-inline.c:2653
Please submit a full bug report, ....

g++ -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc430/configure --prefix=/usr/local/gcc430
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.3.0 20080201 (experimental) (GCC)

I could reproduce the bug on i686-pc-linux-gnu as well. I only got it with g++
4.3.0, not with 4.2.2, 4.1.2, or 4.0.4.

PS - My apologies for the large test case. I tried to reduce it, but got
totally frustrated because removing code almost invariably made the bug go
away.


-- 
           Summary: ICE: in expand_call_inline, at tree-inline.c:2653
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: p dot vanhoof at oma dot be


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


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

* [Bug c++/35149] ICE: in expand_call_inline, at tree-inline.c:2653
  2008-02-09 19:09 [Bug c++/35149] New: ICE: in expand_call_inline, at tree-inline.c:2653 p dot vanhoof at oma dot be
@ 2008-02-09 19:12 ` p dot vanhoof at oma dot be
  2008-02-10  9:53 ` Ralf dot Wildenhues at gmx dot de
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: p dot vanhoof at oma dot be @ 2008-02-09 19:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from p dot vanhoof at oma dot be  2008-02-09 19:11 -------
Created an attachment (id=15124)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15124&action=view)
test case that fails


-- 


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


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

* [Bug c++/35149] ICE: in expand_call_inline, at tree-inline.c:2653
  2008-02-09 19:09 [Bug c++/35149] New: ICE: in expand_call_inline, at tree-inline.c:2653 p dot vanhoof at oma dot be
  2008-02-09 19:12 ` [Bug c++/35149] " p dot vanhoof at oma dot be
@ 2008-02-10  9:53 ` Ralf dot Wildenhues at gmx dot de
  2008-02-10  9:54 ` Ralf dot Wildenhues at gmx dot de
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Ralf dot Wildenhues at gmx dot de @ 2008-02-10  9:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from Ralf dot Wildenhues at gmx dot de  2008-02-10 09:52 -------
Created an attachment (id=15126)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15126&action=view)
slightly reduced testcase

This is what multidelta gets me (see
<http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction>).
Sorry, I don't have time for manual reduction ATM.


-- 


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


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

* [Bug c++/35149] ICE: in expand_call_inline, at tree-inline.c:2653
  2008-02-09 19:09 [Bug c++/35149] New: ICE: in expand_call_inline, at tree-inline.c:2653 p dot vanhoof at oma dot be
  2008-02-09 19:12 ` [Bug c++/35149] " p dot vanhoof at oma dot be
  2008-02-10  9:53 ` Ralf dot Wildenhues at gmx dot de
@ 2008-02-10  9:54 ` Ralf dot Wildenhues at gmx dot de
  2008-02-10 13:55 ` Ralf dot Wildenhues at gmx dot de
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Ralf dot Wildenhues at gmx dot de @ 2008-02-10  9:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from Ralf dot Wildenhues at gmx dot de  2008-02-10 09:53 -------
Created an attachment (id=15127)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15127&action=view)
fix mime type of gzipped testcase


-- 

Ralf dot Wildenhues at gmx dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #15126|0                           |1
        is obsolete|                            |


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


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

* [Bug c++/35149] ICE: in expand_call_inline, at tree-inline.c:2653
  2008-02-09 19:09 [Bug c++/35149] New: ICE: in expand_call_inline, at tree-inline.c:2653 p dot vanhoof at oma dot be
                   ` (2 preceding siblings ...)
  2008-02-10  9:54 ` Ralf dot Wildenhues at gmx dot de
@ 2008-02-10 13:55 ` Ralf dot Wildenhues at gmx dot de
  2008-02-10 23:02 ` [Bug middle-end/35149] [4.3 Regression] " rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Ralf dot Wildenhues at gmx dot de @ 2008-02-10 13:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from Ralf dot Wildenhues at gmx dot de  2008-02-10 13:55 -------
Created an attachment (id=15128)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15128&action=view)
slightly more reduced testcase


-- 

Ralf dot Wildenhues at gmx dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #15127|0                           |1
        is obsolete|                            |


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


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

* [Bug middle-end/35149] [4.3 Regression] ICE: in expand_call_inline, at tree-inline.c:2653
  2008-02-09 19:09 [Bug c++/35149] New: ICE: in expand_call_inline, at tree-inline.c:2653 p dot vanhoof at oma dot be
                   ` (3 preceding siblings ...)
  2008-02-10 13:55 ` Ralf dot Wildenhues at gmx dot de
@ 2008-02-10 23:02 ` rguenth at gcc dot gnu dot org
  2008-02-13 13:27 ` hubicka at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-10 23:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2008-02-10 23:01 -------
I can confirm the ICE on i686 with -m64 (the reduced testcase doesn't fail with
-m32 on i686 for me).  Adding any optimization flag makes the ICE go away
(thus,
non-SSA inlining ICEs).

      /* We have missing edge in the callgraph.  This can happen in one case
         where previous inlining turned indirect call into direct call by
         constant propagating arguments.  In all other cases we hit a bug
         (incorrect node sharing is most common reason for missing edges.  */
      gcc_assert (dest->needed || !flag_unit_at_a_time);

more reduction is necessary here.  I also think this is a minor issue
due to the fact it only triggers at -O0 with inlining.  Works for me
with 4.2.3.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
          Component|c++                         |middle-end
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
      Known to work|                            |4.2.3
           Priority|P3                          |P2
   Last reconfirmed|0000-00-00 00:00:00         |2008-02-10 23:01:45
               date|                            |
            Summary|ICE: in expand_call_inline, |[4.3 Regression] ICE: in
                   |at tree-inline.c:2653       |expand_call_inline, at tree-
                   |                            |inline.c:2653
   Target Milestone|---                         |4.3.0


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


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

* [Bug middle-end/35149] [4.3 Regression] ICE: in expand_call_inline, at tree-inline.c:2653
  2008-02-09 19:09 [Bug c++/35149] New: ICE: in expand_call_inline, at tree-inline.c:2653 p dot vanhoof at oma dot be
                   ` (4 preceding siblings ...)
  2008-02-10 23:02 ` [Bug middle-end/35149] [4.3 Regression] " rguenth at gcc dot gnu dot org
@ 2008-02-13 13:27 ` hubicka at gcc dot gnu dot org
  2008-02-13 17:30 ` hubicka at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2008-02-13 13:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from hubicka at gcc dot gnu dot org  2008-02-13 13:26 -------
I am looking into it.  Obviously cgraph is out of sync for whatever reason.

Honza


-- 

hubicka at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |hubicka at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-02-10 23:01:45         |2008-02-13 13:26:45
               date|                            |


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


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

* [Bug middle-end/35149] [4.3 Regression] ICE: in expand_call_inline, at tree-inline.c:2653
  2008-02-09 19:09 [Bug c++/35149] New: ICE: in expand_call_inline, at tree-inline.c:2653 p dot vanhoof at oma dot be
                   ` (5 preceding siblings ...)
  2008-02-13 13:27 ` hubicka at gcc dot gnu dot org
@ 2008-02-13 17:30 ` hubicka at gcc dot gnu dot org
  2008-02-14  6:47 ` Ralf dot Wildenhues at gmx dot de
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2008-02-13 17:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hubicka at gcc dot gnu dot org  2008-02-13 17:29 -------
This one liner actually took me a while.  It is quite ugly ordering issue.
Index: ipa.c
===================================================================
--- ipa.c       (revision 132243)
+++ ipa.c       (working copy)
@@ -192,6 +192,7 @@ cgraph_remove_unreachable_nodes (bool be
                    }
                  cgraph_node_remove_callees (node);
                  node->analyzed = false;
+                 node->local.inlinable = false;
                }
              else
                cgraph_remove_node (node);


-- 


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


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

* [Bug middle-end/35149] [4.3 Regression] ICE: in expand_call_inline, at tree-inline.c:2653
  2008-02-09 19:09 [Bug c++/35149] New: ICE: in expand_call_inline, at tree-inline.c:2653 p dot vanhoof at oma dot be
                   ` (6 preceding siblings ...)
  2008-02-13 17:30 ` hubicka at gcc dot gnu dot org
@ 2008-02-14  6:47 ` Ralf dot Wildenhues at gmx dot de
  2008-02-15 11:16 ` hubicka at gcc dot gnu dot org
  2008-02-15 11:17 ` hubicka at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: Ralf dot Wildenhues at gmx dot de @ 2008-02-14  6:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from Ralf dot Wildenhues at gmx dot de  2008-02-14 06:46 -------
Subject: Re:  [4.3 Regression] ICE: in
        expand_call_inline, at tree-inline.c:2653

* hubicka at gcc dot gnu dot org wrote on Wed, Feb 13, 2008 at 06:29:51PM CET:
> ------- Comment #7 from hubicka at gcc dot gnu dot org  2008-02-13 17:29 -------
> This one liner actually took me a while.  It is quite ugly ordering issue.
> Index: ipa.c
> ===================================================================
> --- ipa.c       (revision 132243)
> +++ ipa.c       (working copy)
> @@ -192,6 +192,7 @@ cgraph_remove_unreachable_nodes (bool be
>                     }
>                   cgraph_node_remove_callees (node);
>                   node->analyzed = false;
> +                 node->local.inlinable = false;
>                 }
>               else
>                 cgraph_remove_node (node);

This patch fixes the failure for me.  Thanks for working on it!


-- 


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


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

* [Bug middle-end/35149] [4.3 Regression] ICE: in expand_call_inline, at tree-inline.c:2653
  2008-02-09 19:09 [Bug c++/35149] New: ICE: in expand_call_inline, at tree-inline.c:2653 p dot vanhoof at oma dot be
                   ` (7 preceding siblings ...)
  2008-02-14  6:47 ` Ralf dot Wildenhues at gmx dot de
@ 2008-02-15 11:16 ` hubicka at gcc dot gnu dot org
  2008-02-15 11:17 ` hubicka at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2008-02-15 11:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from hubicka at gcc dot gnu dot org  2008-02-15 11:15 -------
Fixed by my patch.


-- 

hubicka at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug middle-end/35149] [4.3 Regression] ICE: in expand_call_inline, at tree-inline.c:2653
  2008-02-09 19:09 [Bug c++/35149] New: ICE: in expand_call_inline, at tree-inline.c:2653 p dot vanhoof at oma dot be
                   ` (8 preceding siblings ...)
  2008-02-15 11:16 ` hubicka at gcc dot gnu dot org
@ 2008-02-15 11:17 ` hubicka at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2008-02-15 11:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from hubicka at gcc dot gnu dot org  2008-02-15 11:16 -------
Subject: Bug 35149

Author: hubicka
Date: Fri Feb 15 11:15:48 2008
New Revision: 132337

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132337
Log:

        PR middle-end/35149
        * ipa.c (cgraph_remove_unreachable_nodes): Clear local.inlinable flag.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa.c


-- 


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


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

end of thread, other threads:[~2008-02-15 11:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-09 19:09 [Bug c++/35149] New: ICE: in expand_call_inline, at tree-inline.c:2653 p dot vanhoof at oma dot be
2008-02-09 19:12 ` [Bug c++/35149] " p dot vanhoof at oma dot be
2008-02-10  9:53 ` Ralf dot Wildenhues at gmx dot de
2008-02-10  9:54 ` Ralf dot Wildenhues at gmx dot de
2008-02-10 13:55 ` Ralf dot Wildenhues at gmx dot de
2008-02-10 23:02 ` [Bug middle-end/35149] [4.3 Regression] " rguenth at gcc dot gnu dot org
2008-02-13 13:27 ` hubicka at gcc dot gnu dot org
2008-02-13 17:30 ` hubicka at gcc dot gnu dot org
2008-02-14  6:47 ` Ralf dot Wildenhues at gmx dot de
2008-02-15 11:16 ` hubicka at gcc dot gnu dot org
2008-02-15 11:17 ` hubicka at gcc dot gnu dot 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).