public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57107] New: tree check fail in unlink_stmt_vdef
@ 2013-04-29 8:07 dcb314 at hotmail dot com
2013-04-29 8:08 ` [Bug c++/57107] " dcb314 at hotmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dcb314 at hotmail dot com @ 2013-04-29 8:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57107
Bug #: 57107
Summary: tree check fail in unlink_stmt_vdef
Classification: Unclassified
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dcb314@hotmail.com
I just tried to compile the package luminance-hdr-2.3.0-6
on gcc-4.9 trunk dated 20130428 on an AMD x86_64 box.
The compiler said
/home/dcb/rpmbuild/BUILD/luminance-hdr-2.3.0/src/Fileformat/pngwriter.cpp:205:1:
internal compiler error: tree check: expected ssa_name, have var_decl in
unlink_stmt_vdef, at tree-ssa-operands.c:1322
}
^
0xc8c92a tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../src/trunk/gcc/tree.c:8972
0xbc0db7 tree_check
../../src/trunk/gcc/tree.h:3690
0xbc0db7 unlink_stmt_vdef(gimple_statement_d*)
../../src/trunk/gcc/tree-ssa-operands.c:1322
0xae2919 optimize_clobbers
../../src/trunk/gcc/tree-eh.c:3298
0xae681b cleanup_empty_eh
../../src/trunk/gcc/tree-eh.c:4227
0xae681b cleanup_all_empty_eh
../../src/trunk/gcc/tree-eh.c:4355
0xae681b execute_cleanup_eh_1
../../src/trunk/gcc/tree-eh.c:4384
0xae681b execute_cleanup_eh
../../src/trunk/gcc/tree-eh.c:4409
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Preprocessed source code attached. Flag -O2 required.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/57107] tree check fail in unlink_stmt_vdef
2013-04-29 8:07 [Bug c++/57107] New: tree check fail in unlink_stmt_vdef dcb314 at hotmail dot com
@ 2013-04-29 8:08 ` dcb314 at hotmail dot com
2013-04-29 9:00 ` markus at trippelsdorf dot de
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dcb314 at hotmail dot com @ 2013-04-29 8:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57107
--- Comment #1 from David Binderman <dcb314 at hotmail dot com> 2013-04-29 08:08:34 UTC ---
Created attachment 29969
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29969
gzipped C++ source code
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/57107] tree check fail in unlink_stmt_vdef
2013-04-29 8:07 [Bug c++/57107] New: tree check fail in unlink_stmt_vdef dcb314 at hotmail dot com
2013-04-29 8:08 ` [Bug c++/57107] " dcb314 at hotmail dot com
@ 2013-04-29 9:00 ` markus at trippelsdorf dot de
2013-04-29 16:31 ` mpolacek at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: markus at trippelsdorf dot de @ 2013-04-29 9:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57107
Markus Trippelsdorf <markus at trippelsdorf dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |markus at trippelsdorf dot
| |de
--- Comment #2 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2013-04-29 09:00:33 UTC ---
Reduced:
class A {
public:
template <typename _Tp1> struct rebind {
typedef A other;
};
~A() {}
};
template <typename _Alloc> struct __alloc_traits {
template <typename _Tp> struct rebind {
typedef typename _Alloc::template rebind<_Tp>::other other;
};
};
template <typename _Tp, typename _Alloc> struct B {
typedef typename __alloc_traits<_Alloc>::template rebind<_Tp>::other
_Tp_alloc_type;
struct C : _Tp_alloc_type {
C(_Tp_alloc_type) : _Tp_alloc_type() {}
};
typedef _Alloc allocator_type;
B(int, const allocator_type &p2) : _M_impl(p2) {}
C _M_impl;
};
template <typename _Tp, typename _Alloc = A> class D : B<_Tp, _Alloc> {
typedef B<_Tp, _Alloc> _Base;
public:
typedef _Tp value_type;
typedef _Alloc allocator_type;
D(const value_type &p1, const allocator_type &p2 = allocator_type())
: _Base(0, p2) {
_M_fill_initialize(p1);
}
void _M_fill_initialize(const value_type &);
};
void _setjmp();
void writeQImageToPng() {
_setjmp();
D<unsigned*>(0);
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/57107] tree check fail in unlink_stmt_vdef
2013-04-29 8:07 [Bug c++/57107] New: tree check fail in unlink_stmt_vdef dcb314 at hotmail dot com
2013-04-29 8:08 ` [Bug c++/57107] " dcb314 at hotmail dot com
2013-04-29 9:00 ` markus at trippelsdorf dot de
@ 2013-04-29 16:31 ` mpolacek at gcc dot gnu.org
2013-04-30 8:24 ` [Bug middle-end/57107] [4.9 Regression] " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-04-29 16:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57107
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-04-29
CC| |mpolacek at gcc dot
| |gnu.org, rguenth at gcc dot
| |gnu.org
Ever Confirmed|0 |1
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-04-29 16:31:26 UTC ---
Confirmed. Started with http://gcc.gnu.org/r198096
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/57107] [4.9 Regression] tree check fail in unlink_stmt_vdef
2013-04-29 8:07 [Bug c++/57107] New: tree check fail in unlink_stmt_vdef dcb314 at hotmail dot com
` (2 preceding siblings ...)
2013-04-29 16:31 ` mpolacek at gcc dot gnu.org
@ 2013-04-30 8:24 ` rguenth at gcc dot gnu.org
2013-04-30 10:53 ` rguenth at gcc dot gnu.org
2013-04-30 13:54 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-30 8:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57107
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Component|c++ |middle-end
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.9.0
Summary|tree check fail in |[4.9 Regression] tree check
|unlink_stmt_vdef |fail in unlink_stmt_vdef
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-30 08:24:44 UTC ---
I will have a look.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/57107] [4.9 Regression] tree check fail in unlink_stmt_vdef
2013-04-29 8:07 [Bug c++/57107] New: tree check fail in unlink_stmt_vdef dcb314 at hotmail dot com
` (3 preceding siblings ...)
2013-04-30 8:24 ` [Bug middle-end/57107] [4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-04-30 10:53 ` rguenth at gcc dot gnu.org
2013-04-30 13:54 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-30 10:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57107
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-30 10:53:21 UTC ---
(gdb) call debug_gimple_stmt (stmt)
# .MEM_159(ab) = VDEF <.MEM>
D.63506 ={v} {CLOBBER};
SSA form is not up-to-date. It's a latent issue with sinking clobbers
during EH cleanup. We have
<L6>:
# .MEM_32(ab) = VDEF <.MEM_31(ab)>
D.2688 ={v} {CLOBBER};
resx 3
<L7>:
# .MEM_61 = VDEF <.MEM_32(ab)>
MEM[(struct new_allocator *)&D.2706] ={v} {CLOBBER};
# .MEM_62 = VDEF <.MEM_61>
D.2706 ={v} {CLOBBER};
# .MEM_34 = VDEF <.MEM_62>
D.2706 ={v} {CLOBBER};
resx 2
<L8>:
# .MEM_35 = VDEF <.MEM_34>
t ={v} {CLOBBER};
resx 1
and first sink D.2688 ={v} {CLOBBER}; into the successor (L7), dropping
virtual operands. Then we continue sinking but call unlink_stmt_vdef
on the moved stmt which no longer has up-to-date SSA form and thus
we ICE.
As we only sink across forwarder edges we can trivially keep the original
virtual operands in place.
I have a patch.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/57107] [4.9 Regression] tree check fail in unlink_stmt_vdef
2013-04-29 8:07 [Bug c++/57107] New: tree check fail in unlink_stmt_vdef dcb314 at hotmail dot com
` (4 preceding siblings ...)
2013-04-30 10:53 ` rguenth at gcc dot gnu.org
@ 2013-04-30 13:54 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-30 13:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57107
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-30 13:54:32 UTC ---
Author: rguenth
Date: Tue Apr 30 13:54:14 2013
New Revision: 198454
URL: http://gcc.gnu.org/viewcvs?rev=198454&root=gcc&view=rev
Log:
2013-04-30 Richard Biener <rguenther@suse.de>
PR middle-end/57107
* tree-eh.c (sink_clobbers): Preserve virtual SSA form.
* g++.dg/torture/pr57107.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr57107.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-eh.c
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-04-30 13:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-29 8:07 [Bug c++/57107] New: tree check fail in unlink_stmt_vdef dcb314 at hotmail dot com
2013-04-29 8:08 ` [Bug c++/57107] " dcb314 at hotmail dot com
2013-04-29 9:00 ` markus at trippelsdorf dot de
2013-04-29 16:31 ` mpolacek at gcc dot gnu.org
2013-04-30 8:24 ` [Bug middle-end/57107] [4.9 Regression] " rguenth at gcc dot gnu.org
2013-04-30 10:53 ` rguenth at gcc dot gnu.org
2013-04-30 13:54 ` 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).