public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/43218]  New: [LTO] Conflicting function types cause ICE
@ 2010-03-01 10:28 d dot g dot gorbachev at gmail dot com
  2010-03-01 12:43 ` [Bug lto/43218] " d dot g dot gorbachev at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: d dot g dot gorbachev at gmail dot com @ 2010-03-01 10:28 UTC (permalink / raw)
  To: gcc-bugs

#1

lto1: internal compiler error: in cgraph_estimate_size_after_inlining, at
ipa-inline.c:206
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /usr/local/bin/i686-pc-linux-gnu-gcc-4.5.0 returned 1 exit status
collect2: lto-wrapper returned 1 exit status

#2

In file included from expand_call_inline-2.c:1:0,
                 from expand_call_inline-1.c:1,
                 from :0:
expand_call_inline-1.c: In function 'main':
expand_call_inline-1.c:5:11: internal compiler error: in expand_call_inline, at
tree-inline.c:3798
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /usr/local/bin/i686-pc-linux-gnu-gcc-4.5.0 returned 1 exit status
collect2: lto-wrapper returned 1 exit status

#3

In file included from fold_convert_loc-2.c:1:0,
                 from fold_convert_loc-1.c:1,
                 from :0:
fold_convert_loc-1.c: In function 'main':
fold_convert_loc-1.c:5:3: internal compiler error: in fold_convert_loc, at
fold-const.c:2670
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /usr/local/bin/i686-pc-linux-gnu-gcc-4.5.0 returned 1 exit status
collect2: lto-wrapper returned 1 exit status


-- 
           Summary: [LTO] Conflicting function types cause ICE
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: d dot g dot gorbachev at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug lto/43218] [LTO] Conflicting function types cause ICE
  2010-03-01 10:28 [Bug lto/43218] New: [LTO] Conflicting function types cause ICE d dot g dot gorbachev at gmail dot com
@ 2010-03-01 12:43 ` d dot g dot gorbachev at gmail dot com
  2010-03-01 15:27 ` rguenth at gcc dot gnu dot org
  2010-04-26 11:22 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: d dot g dot gorbachev at gmail dot com @ 2010-03-01 12:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from d dot g dot gorbachev at gmail dot com  2010-03-01 12:43 -------
Created an attachment (id=19995)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19995&action=view)
Three testcases

Compile with `-flto -O2'


-- 


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


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

* [Bug lto/43218] [LTO] Conflicting function types cause ICE
  2010-03-01 10:28 [Bug lto/43218] New: [LTO] Conflicting function types cause ICE d dot g dot gorbachev at gmail dot com
  2010-03-01 12:43 ` [Bug lto/43218] " d dot g dot gorbachev at gmail dot com
@ 2010-03-01 15:27 ` rguenth at gcc dot gnu dot org
  2010-04-26 11:22 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-01 15:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-03-01 15:27 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-03-01 15:27:36
               date|                            |


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


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

* [Bug lto/43218] [LTO] Conflicting function types cause ICE
  2010-03-01 10:28 [Bug lto/43218] New: [LTO] Conflicting function types cause ICE d dot g dot gorbachev at gmail dot com
  2010-03-01 12:43 ` [Bug lto/43218] " d dot g dot gorbachev at gmail dot com
  2010-03-01 15:27 ` rguenth at gcc dot gnu dot org
@ 2010-04-26 11:22 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-26 11:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-04-26 11:22 -------
Testcase #1 no longer fails on the branch or the trunk.

Testcase #3 is a dup of PR43455, testcase #2 is related.

I'll open a new clarified bug for #2.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.0


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


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

* [Bug lto/43218] [LTO] Conflicting function types cause ICE
       [not found] <bug-43218-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-11-24 17:41 ` rguenth at gcc dot gnu.org
@ 2010-11-24 17:53 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-24 17:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-24 17:07:46 UTC ---
Fixed on trunk again.  4.5 is too different to fix.


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

* [Bug lto/43218] [LTO] Conflicting function types cause ICE
       [not found] <bug-43218-4@http.gcc.gnu.org/bugzilla/>
  2010-11-20 15:27 ` d.g.gorbachev at gmail dot com
  2010-11-24 15:49 ` rguenth at gcc dot gnu.org
@ 2010-11-24 17:41 ` rguenth at gcc dot gnu.org
  2010-11-24 17:53 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-24 17:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-24 17:06:46 UTC ---
Author: rguenth
Date: Wed Nov 24 17:06:41 2010
New Revision: 167122

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167122
Log:
2010-11-24  Richard Guenther  <rguenther@suse.de>

    PR lto/43218
    * lto-symtab.c (lto_cgraph_replace_node): Mark edges with
    conflicting function signatures as non-inlineable.

    * gcc.dg/lto/20100423-1_0.c: Enable for all LTO modes.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lto-symtab.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/lto/20100423-1_0.c


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

* [Bug lto/43218] [LTO] Conflicting function types cause ICE
       [not found] <bug-43218-4@http.gcc.gnu.org/bugzilla/>
  2010-11-20 15:27 ` d.g.gorbachev at gmail dot com
@ 2010-11-24 15:49 ` rguenth at gcc dot gnu.org
  2010-11-24 17:41 ` rguenth at gcc dot gnu.org
  2010-11-24 17:53 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-24 15:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-24 15:17:42 UTC ---
They now fail because -flto is now -fwhopr.  They are all fixed with
-flto -flto-partition=none.

expand_call_inline ICE:

4043          gcc_assert (gimple_assign_single_p (stmt)
4044                      || CONVERT_EXPR_CODE_P (gimple_assign_rhs_code
(stmt)));

(gdb) call debug_gimple_stmt (stmt)
D.2008_1 = (<float:32>) D.2015;

because we inline int f(void) as if it were float f(void).  The can-inline-p
check doesn't work in WPA mode as we do not have the call stmt around.

We of course would also ICE during stmt verification if we didn't inline
this function.  For non-function decls we wrap them inside MEM_REFs
serving as VIEW_CONVERT_EXPRs, we don't do that for fns because that
caused regressions elsewhere, so a fix is delayed to the point where
we properly preserve the call ABI type for calls.

Ahm, at ltrans stage we have

 <addr_expr 0x7ffff7ed6480
    type <pointer_type 0x7ffff5d00f18
        type <function_type 0x7ffff5d07000 type <real_type 0x7ffff7ef0000>
...
    arg 0 <function_decl 0x7ffff5d04800 f
        type <function_type 0x7ffff5d00e70 type <integer_type 0x7ffff7ee3498>

for the call fn, so the type is preserved but the addr-expr contains a
mismatch (which verification I disabled for lto).

We could warn or error for ABI incompatible function signatures, but
somebody has to write a proper predicate first.

Hmm, I'll try to fix this up at symbol/cgraph merging time.


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

* [Bug lto/43218] [LTO] Conflicting function types cause ICE
       [not found] <bug-43218-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-20 15:27 ` d.g.gorbachev at gmail dot com
  2010-11-24 15:49 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2010-11-20 15:27 UTC (permalink / raw)
  To: gcc-bugs

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

Dmitry Gorbachev <d.g.gorbachev at gmail dot com> changed:

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

--- Comment #4 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2010-11-20 15:17:28 UTC ---
Testcases #2 and #3 still fail with GCC 4.6.0 20101113. Testcase #1 fails with
GCC 4.5.2.


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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-01 10:28 [Bug lto/43218] New: [LTO] Conflicting function types cause ICE d dot g dot gorbachev at gmail dot com
2010-03-01 12:43 ` [Bug lto/43218] " d dot g dot gorbachev at gmail dot com
2010-03-01 15:27 ` rguenth at gcc dot gnu dot org
2010-04-26 11:22 ` rguenth at gcc dot gnu dot org
     [not found] <bug-43218-4@http.gcc.gnu.org/bugzilla/>
2010-11-20 15:27 ` d.g.gorbachev at gmail dot com
2010-11-24 15:49 ` rguenth at gcc dot gnu.org
2010-11-24 17:41 ` rguenth at gcc dot gnu.org
2010-11-24 17:53 ` rguenth 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).