public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/50747] [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435
2011-10-16 17:45 [Bug lto/50747] New: [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435 markus at trippelsdorf dot de
@ 2011-10-16 17:45 ` markus at trippelsdorf dot de
2011-10-17 7:14 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: markus at trippelsdorf dot de @ 2011-10-16 17:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50747
--- Comment #1 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-10-16 17:45:35 UTC ---
Created attachment 25517
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25517
delta reduced testcase
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50747] New: [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435
@ 2011-10-16 17:45 markus at trippelsdorf dot de
2011-10-16 17:45 ` [Bug lto/50747] " markus at trippelsdorf dot de
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: markus at trippelsdorf dot de @ 2011-10-16 17:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50747
Bug #: 50747
Summary: [4.7 Regression] ICE in produce_symtab, at
lto-streamer-out.c:1435
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: markus@trippelsdorf.de
While I was trying to build gcc with -fno-fat-lto-objects I hit this ICE:
../../../../gcc/libstdc++-v3/src/complex_io.cc:92:1: internal compiler error:
in produce_symtab, at lto-streamer-out.c:1435
Reduced testcase is attached.
% g++ -fno-implicit-templates -w -fpermissive -flto test.ii
test.ii:108:23: internal compiler error: in produce_symtab, at
lto-streamer-out.c:1435
Please submit a full bug report,
with preprocessed source if appropriate.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50747] [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435
2011-10-16 17:45 [Bug lto/50747] New: [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435 markus at trippelsdorf dot de
2011-10-16 17:45 ` [Bug lto/50747] " markus at trippelsdorf dot de
@ 2011-10-17 7:14 ` rguenth at gcc dot gnu.org
2011-10-27 11:06 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-17 7:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50747
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |lto
Target Milestone|--- |4.7.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50747] [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435
2011-10-16 17:45 [Bug lto/50747] New: [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435 markus at trippelsdorf dot de
2011-10-16 17:45 ` [Bug lto/50747] " markus at trippelsdorf dot de
2011-10-17 7:14 ` rguenth at gcc dot gnu.org
@ 2011-10-27 11:06 ` rguenth at gcc dot gnu.org
2011-10-27 11:41 ` markus at trippelsdorf dot de
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-27 11:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50747
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-10-27
Known to work| |4.6.2
Ever Confirmed|0 |1
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-27 11:05:41 UTC ---
Confirmed.
1432 if (!node->address_taken && !node->callers)
1433 {
1434 gcc_assert (node->analyzed);
1435 gcc_assert (DECL_DECLARED_INLINE_P (node->decl));
hits.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50747] [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435
2011-10-16 17:45 [Bug lto/50747] New: [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435 markus at trippelsdorf dot de
` (2 preceding siblings ...)
2011-10-27 11:06 ` rguenth at gcc dot gnu.org
@ 2011-10-27 11:41 ` markus at trippelsdorf dot de
2011-11-19 23:37 ` reichelt at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: markus at trippelsdorf dot de @ 2011-10-27 11:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50747
--- Comment #3 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-10-27 11:39:23 UTC ---
I've been running gcc with this patch since the last week without ill
effects thus far:
@@ -1429,14 +1429,14 @@ produce_symtab (struct output_block *ob,
/* We keep around unused extern inlines in order to be able to inline
them indirectly or via vtables. Do not output them to symbol
table: they end up being undefined and just consume space. */
- if (!node->address_taken && !node->callers)
+ if (!node->address_taken && !node->callers && DECL_DECLARED_INLINE_P
(node->decl))
{
gcc_assert (node->analyzed);
- gcc_assert (DECL_DECLARED_INLINE_P (node->decl));
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50747] [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435
2011-10-16 17:45 [Bug lto/50747] New: [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435 markus at trippelsdorf dot de
` (3 preceding siblings ...)
2011-10-27 11:41 ` markus at trippelsdorf dot de
@ 2011-11-19 23:37 ` reichelt at gcc dot gnu.org
2011-12-07 16:14 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-11-19 23:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50747
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu.org
--- Comment #4 from Volker Reichelt <reichelt at gcc dot gnu.org> 2011-11-19 22:58:50 UTC ---
Here's a different testcase that triggers the assertion one line before when
compiled with "-flto". So the proposed fix might not be sufficient.
=====================================================
void foo();
static void bar() __attribute__((weakref("foo")));
struct A
{
A();
};
int i;
template <typename T, int&> struct B : T {};
B<A, i> b;
=====================================================
bug.cc:14:10: internal compiler error: in produce_symtab, at
lto-streamer-out.c:1434
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50747] [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435
2011-10-16 17:45 [Bug lto/50747] New: [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435 markus at trippelsdorf dot de
` (4 preceding siblings ...)
2011-11-19 23:37 ` reichelt at gcc dot gnu.org
@ 2011-12-07 16:14 ` rguenth at gcc dot gnu.org
2011-12-08 12:34 ` rguenth at gcc dot gnu.org
2011-12-08 12:39 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-07 16:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50747
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-07 16:13:14 UTC ---
The function in question is DECL_ABSTRACT (it's one of the B::B constructors).
Not sure why we have a cgraph node for it at all:
#0 cgraph_create_node (decl=0x7ffff5b92500)
at /space/rguenther/src/svn/trunk/gcc/cgraph.c:495
#1 0x00000000009b6878 in cgraph_get_create_node (decl=0x7ffff5b92500)
at /space/rguenther/src/svn/trunk/gcc/cgraph.c:543
#2 0x00000000008c3303 in c_genericize (fndecl=0x7ffff5b92500)
at /space/rguenther/src/svn/trunk/gcc/c-family/c-gimplify.c:101
#3 0x0000000000858e0a in cp_genericize (fndecl=0x7ffff5b92500)
at /space/rguenther/src/svn/trunk/gcc/cp/cp-gimplify.c:1172
#4 0x0000000000547836 in finish_function (flags=0)
at /space/rguenther/src/svn/trunk/gcc/cp/decl.c:13478
#5 0x0000000000769a05 in synthesize_method (fndecl=0x7ffff5b92500)
at /space/rguenther/src/svn/trunk/gcc/cp/method.c:774
#6 0x000000000068fd62 in mark_used (decl=0x7ffff5b92600)
at /space/rguenther/src/svn/trunk/gcc/cp/decl2.c:4372
#7 0x00000000004d0a88 in build_over_call (cand=0x1f33fd0, flags=3, complain=3)
at /space/rguenther/src/svn/trunk/gcc/cp/call.c:6727
#8 0x00000000004d590c in build_new_method_call_1 (instance=0x7ffff5a2c1e0,
fns=0x7ffff5b79a80, args=0x7fffffffcc50, conversion_path=0x7ffff5b8c340,
flags=3, fn_p=0x0, complain=3)
at /space/rguenther/src/svn/trunk/gcc/cp/call.c:7337
The following fixes the ICE for Volkers testcase, but not the original
from Markus:
@@ -1431,8 +1444,9 @@ produce_symtab (struct output_block *ob,
table: they end up being undefined and just consume space. */
if (!node->address_taken && !node->callers)
{
- gcc_assert (node->analyzed);
- gcc_assert (DECL_DECLARED_INLINE_P (node->decl));
+ gcc_assert ((node->analyzed
+ && DECL_DECLARED_INLINE_P (node->decl))
+ || DECL_ABSTRACT (node->decl));
continue;
}
if (DECL_COMDAT (node->decl)
why assert anything at all here? That is, that's the fix I'd do:
@@ -1430,11 +1443,7 @@ produce_symtab (struct output_block *ob,
them indirectly or via vtables. Do not output them to symbol
table: they end up being undefined and just consume space. */
if (!node->address_taken && !node->callers)
- {
- gcc_assert (node->analyzed);
- gcc_assert (DECL_DECLARED_INLINE_P (node->decl));
- continue;
- }
+ continue;
if (DECL_COMDAT (node->decl)
&& cgraph_comdat_can_be_unshared_p (node))
continue;
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50747] [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435
2011-10-16 17:45 [Bug lto/50747] New: [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435 markus at trippelsdorf dot de
` (5 preceding siblings ...)
2011-12-07 16:14 ` rguenth at gcc dot gnu.org
@ 2011-12-08 12:34 ` rguenth at gcc dot gnu.org
2011-12-08 12:39 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-08 12:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50747
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-08 12:32:24 UTC ---
Author: rguenth
Date: Thu Dec 8 12:32:19 2011
New Revision: 182108
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182108
Log:
2011-12-08 Richard Guenther <rguenther@suse.de>
PR lto/50747
* lto-streamer-out.c (produce_symtab): Remove asserts.
* g++.dg/opt/pr50747-1_0.C: New testcase.
* g++.dg/opt/pr50747-2_0.C: Likewise.
Added:
trunk/gcc/testsuite/g++.dg/opt/pr50747-1_0.C
trunk/gcc/testsuite/g++.dg/opt/pr50747-2_0.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/lto-streamer-out.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50747] [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435
2011-10-16 17:45 [Bug lto/50747] New: [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435 markus at trippelsdorf dot de
` (6 preceding siblings ...)
2011-12-08 12:34 ` rguenth at gcc dot gnu.org
@ 2011-12-08 12:39 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-08 12:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50747
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-08 12:32:37 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-12-08 12:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-16 17:45 [Bug lto/50747] New: [4.7 Regression] ICE in produce_symtab, at lto-streamer-out.c:1435 markus at trippelsdorf dot de
2011-10-16 17:45 ` [Bug lto/50747] " markus at trippelsdorf dot de
2011-10-17 7:14 ` rguenth at gcc dot gnu.org
2011-10-27 11:06 ` rguenth at gcc dot gnu.org
2011-10-27 11:41 ` markus at trippelsdorf dot de
2011-11-19 23:37 ` reichelt at gcc dot gnu.org
2011-12-07 16:14 ` rguenth at gcc dot gnu.org
2011-12-08 12:34 ` rguenth at gcc dot gnu.org
2011-12-08 12:39 ` 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).