public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3
@ 2012-04-11 21:07 dcb314 at hotmail dot com
2012-04-12 9:31 ` [Bug middle-end/52939] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2012-04-11 21:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
Bug #: 52939
Summary: ice in gimple_get_virt_method_for_binfo with -O3
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dcb314@hotmail.com
Created attachment 27137
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27137
gzipped C++ source code
I just tried to compile the package openfst-1.3.1-1
on gcc-4.8 trunk dated 20120411 on an AMD x86_64 box.
The compiler said
determinize.cc: At global scope:
determinize.cc:38:1: internal compiler error: in
gimple_get_virt_method_for_binfo, at gimple-fold.c:3093
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Preprocessed source code attached. Flag -O3 required.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
@ 2012-04-12 9:31 ` rguenth at gcc dot gnu.org
2012-04-12 15:11 ` jamborm at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-12 9:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-04-12
Component|c++ |middle-end
CC| |jamborm at gcc dot gnu.org
Ever Confirmed|0 |1
Summary|ice in |[4.7/4.8 Regression] ice in
|gimple_get_virt_method_for_ |gimple_get_virt_method_for_
|binfo with -O3 |binfo with -O3
Target Milestone|--- |4.7.1
Known to fail| |4.7.0, 4.8.0
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-12 09:31:34 UTC ---
Confirmed. Possibly a regression.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
2012-04-12 9:31 ` [Bug middle-end/52939] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
@ 2012-04-12 15:11 ` jamborm at gcc dot gnu.org
2012-04-12 17:05 ` jamborm at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-04-12 15:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jamborm at gcc dot gnu.org
|gnu.org |
--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-04-12 15:10:50 UTC ---
Well, what happens is that the target of devirtualization which is
loaded from the VMT is:
<integer_cst 0x7fffae757200 type <pointer_type 0x7fffbf12f0a8 __vtbl_ptr_type>
constant 0>
I'll investigate why.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
2012-04-12 9:31 ` [Bug middle-end/52939] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
2012-04-12 15:11 ` jamborm at gcc dot gnu.org
@ 2012-04-12 17:05 ` jamborm at gcc dot gnu.org
2012-04-13 9:59 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-04-12 17:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-04-12 17:05:01 UTC ---
Created attachment 27143
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27143
Simple testcase
This should be a simpler testcase. What happens is that we are
attempting to devirtualize call to a virtual method introduced in a
descendant but with an ancestor which does not have it. I suppose
this is OK if the call is never executed in run-time.
Dealing with this situation in gimple_get_virt_method_for_binfo would
be easy, but perhaps we want fold_ctor_reference to return NULL is it
is requested to fold an expression from beyond the provided
constructor?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
` (2 preceding siblings ...)
2012-04-12 17:05 ` jamborm at gcc dot gnu.org
@ 2012-04-13 9:59 ` rguenth at gcc dot gnu.org
2012-04-13 13:18 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-13 9:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-13 09:58:44 UTC ---
(In reply to comment #3)
> Created attachment 27143 [details]
> Simple testcase
>
> This should be a simpler testcase. What happens is that we are
> attempting to devirtualize call to a virtual method introduced in a
> descendant but with an ancestor which does not have it. I suppose
> this is OK if the call is never executed in run-time.
>
> Dealing with this situation in gimple_get_virt_method_for_binfo would
> be easy, but perhaps we want fold_ctor_reference to return NULL is it
> is requested to fold an expression from beyond the provided
> constructor?
Well, if we know what the size of the constructor target is, yes. Otherwise
all non-initialized parts are implicitely initialized to zero.
Thus, you need to handle this case in gimple_get_virt_method_for_binfo
anyway (fails are always better than asserts ...)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
` (3 preceding siblings ...)
2012-04-13 9:59 ` rguenth at gcc dot gnu.org
@ 2012-04-13 13:18 ` rguenth at gcc dot gnu.org
2012-04-13 13:56 ` jamborm at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-13 13:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
` (4 preceding siblings ...)
2012-04-13 13:18 ` rguenth at gcc dot gnu.org
@ 2012-04-13 13:56 ` jamborm at gcc dot gnu.org
2012-04-13 17:57 ` jamborm at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-04-13 13:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2012-04/msg00835.htm
| |l
--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-04-13 13:55:31 UTC ---
Bah, I posted the patch to fix this with a wrong subject but there it
is:
http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00835.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
` (5 preceding siblings ...)
2012-04-13 13:56 ` jamborm at gcc dot gnu.org
@ 2012-04-13 17:57 ` jamborm at gcc dot gnu.org
2012-04-16 10:02 ` jamborm at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-04-13 17:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
--- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-04-13 17:57:30 UTC ---
Author: jamborm
Date: Fri Apr 13 17:57:21 2012
New Revision: 186428
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186428
Log:
2012-04-13 Martin Jambor <mjambor@suse.cz>
PR middle-end/52939
* gimple-fold.c (gimple_get_virt_method_for_binfo): Bail out if
fold_ctor_reference returns a zero constant.
* testsuite/g++.dg/ipa/pr52939.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/ipa/pr52939.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
` (6 preceding siblings ...)
2012-04-13 17:57 ` jamborm at gcc dot gnu.org
@ 2012-04-16 10:02 ` jamborm at gcc dot gnu.org
2012-04-16 10:11 ` jamborm at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-04-16 10:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
--- Comment #7 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-04-16 10:02:12 UTC ---
Author: jamborm
Date: Mon Apr 16 10:02:04 2012
New Revision: 186489
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186489
Log:
2012-04-16 Martin Jambor <mjambor@suse.cz>
PR middle-end/52939
* gimple-fold.c (gimple_get_virt_method_for_binfo): Bail out if
fold_ctor_reference returns a zero constant.
* testsuite/g++.dg/ipa/pr52939.C: New test.
Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/ipa/pr52939.C
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/gimple-fold.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
` (7 preceding siblings ...)
2012-04-16 10:02 ` jamborm at gcc dot gnu.org
@ 2012-04-16 10:11 ` jamborm at gcc dot gnu.org
2012-08-22 23:53 ` blelbach at cct dot lsu.edu
2012-08-23 9:31 ` jamborm at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-04-16 10:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #8 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-04-16 10:10:48 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
` (8 preceding siblings ...)
2012-04-16 10:11 ` jamborm at gcc dot gnu.org
@ 2012-08-22 23:53 ` blelbach at cct dot lsu.edu
2012-08-23 9:31 ` jamborm at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: blelbach at cct dot lsu.edu @ 2012-08-22 23:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
Bryce Lelbach (wash) <blelbach at cct dot lsu.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |blelbach at cct dot lsu.edu
--- Comment #9 from Bryce Lelbach (wash) <blelbach at cct dot lsu.edu> 2012-08-22 23:52:55 UTC ---
Is the fix for this in a released version of GCC?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
` (9 preceding siblings ...)
2012-08-22 23:53 ` blelbach at cct dot lsu.edu
@ 2012-08-23 9:31 ` jamborm at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-08-23 9:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939
--- Comment #10 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-08-23 09:31:14 UTC ---
(In reply to comment #9)
> Is the fix for this in a released version of GCC?
If I understand our web ViewCVS correctly, the 4.7.1 release was based
on revision 188597 and I have committed the patch to the release
branch as revision 186489. So yes, it should be in the 4.7.1 release.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-08-23 9:31 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11 21:07 [Bug c++/52939] New: ice in gimple_get_virt_method_for_binfo with -O3 dcb314 at hotmail dot com
2012-04-12 9:31 ` [Bug middle-end/52939] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
2012-04-12 15:11 ` jamborm at gcc dot gnu.org
2012-04-12 17:05 ` jamborm at gcc dot gnu.org
2012-04-13 9:59 ` rguenth at gcc dot gnu.org
2012-04-13 13:18 ` rguenth at gcc dot gnu.org
2012-04-13 13:56 ` jamborm at gcc dot gnu.org
2012-04-13 17:57 ` jamborm at gcc dot gnu.org
2012-04-16 10:02 ` jamborm at gcc dot gnu.org
2012-04-16 10:11 ` jamborm at gcc dot gnu.org
2012-08-22 23:53 ` blelbach at cct dot lsu.edu
2012-08-23 9:31 ` jamborm 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).