public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/58165] New: [4.8/4.9 regression] internal compiler error: verify_flow_info
@ 2013-08-15 7:00 aivchenk at gmail dot com
2013-08-15 12:43 ` [Bug regression/58165] " jakub at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: aivchenk at gmail dot com @ 2013-08-15 7:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165
Bug ID: 58165
Summary: [4.8/4.9 regression] internal compiler error:
verify_flow_info
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: regression
Assignee: unassigned at gcc dot gnu.org
Reporter: aivchenk at gmail dot com
extern "C" {
float sqrtf(float);
}
class V
{
public:
double length2 () const {}
double length () const
{
return sqrtf(length2());
}
V& normalize()
{
length();
return *this;
}
};
class B1
{
public:
virtual ~B1 ();
};
class B2: public B1
{
public:
B2(const V& p0,const V& p1,const V& p2) : B1() {}
};
class A1
{
public:
virtual ~A1 ();
};
struct A2: public A1
{
V m_v;
virtual void foo (V v)
{
V v1 (v);
B2 tA (m_v, m_v, m_v);
V v2 = v1.normalize();
}
};
void bar ()
{
A2 a;
}
Compile: g++ -c -O3 test.C
test.C: In member function ‘virtual void A2::foo(V)’:
test.C:43:16: error: BB 6 is missing an EH edge
virtual void foo (V v)
^
test.C:43:16: internal compiler error: verify_flow_info failed
0x8b31ce verify_flow_info()
src/gcc/gcc/cfghooks.c:260
0xbceee7 execute_function_todo
src/gcc/gcc/passes.c:1633
0xbce1b3 do_per_function
src/gcc/gcc/passes.c:1358
0xbcefd7 execute_todo
src/gcc/gcc/passes.c:1660
_________________________________________
The case came from android ndk r9: it's 4.8 is unable to compile bullet lib.
After some investigation I found that it's the same as in usual 4.8-release
with just android sysroot (The reason is that 'sqrtf' is defined in Bionic
without throw, if you add throw() to it, as it is in glibc, the ICE will
disappear again).
The guilty revision is:
Author: eraman <eraman@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Jun 15 17:35:11 2012 +0000
2012-06-15 Easwaran Raman <eraman@google.com>
* passes.c (init_optimization_passes): Remove pass_call_cdce
from its current position and insert after pass_dce.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188675
138bc75d-0d04-0410-961f-82ee72b054a4
>From gcc-bugs-return-427878-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 15 07:06:42 2013
Return-Path: <gcc-bugs-return-427878-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 12347 invoked by alias); 15 Aug 2013 07:06:42 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 12304 invoked by uid 48); 15 Aug 2013 07:06:40 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug regression/58165] [4.8/4.9 regression] internal compiler error: verify_flow_info
Date: Thu, 15 Aug 2013 07:06:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: regression
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pinskia at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58165-4-T4A9RxaALV@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58165-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58165-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-08/txt/msg00802.txt.bz2
Content-length: 175
http://gcc.gnu.org/bugzilla/show_bug.cgi?idX165
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>The guilty revision is:
No that just exposed the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug regression/58165] [4.8/4.9 regression] internal compiler error: verify_flow_info
2013-08-15 7:00 [Bug regression/58165] New: [4.8/4.9 regression] internal compiler error: verify_flow_info aivchenk at gmail dot com
@ 2013-08-15 12:43 ` jakub at gcc dot gnu.org
2013-08-15 12:49 ` aivchenk at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-15 12:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 30661
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30661&action=edit
gcc49-pr58165.patch
Untested fix.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug regression/58165] [4.8/4.9 regression] internal compiler error: verify_flow_info
2013-08-15 7:00 [Bug regression/58165] New: [4.8/4.9 regression] internal compiler error: verify_flow_info aivchenk at gmail dot com
2013-08-15 12:43 ` [Bug regression/58165] " jakub at gcc dot gnu.org
@ 2013-08-15 12:49 ` aivchenk at gmail dot com
2013-08-15 12:56 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: aivchenk at gmail dot com @ 2013-08-15 12:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165
--- Comment #4 from Alexander Ivchenko <aivchenk at gmail dot com> ---
I firstly did something like that:
diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c
index 9b6186e..5862ebf 100644
--- a/gcc/tree-call-cdce.c
+++ b/gcc/tree-call-cdce.c
@@ -771,6 +771,9 @@ shrink_wrap_one_built_in_call (gimple bi_call)
join_tgt_in_edge_fall_thru = make_edge (guard_bb0, join_tgt_bb,
EDGE_FALSE_VALUE);
+ if (!gimple_call_nothrow_p (bi_call))
+ make_eh_edges (bi_call);
+
bi_call_in_edge0->probability = REG_BR_PROB_BASE * ERR_PROB;
bi_call_in_edge0->count =
apply_probability (guard_bb0->count,
which also helped.. but now I see that we shouldn't split the block
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug regression/58165] [4.8/4.9 regression] internal compiler error: verify_flow_info
2013-08-15 7:00 [Bug regression/58165] New: [4.8/4.9 regression] internal compiler error: verify_flow_info aivchenk at gmail dot com
2013-08-15 12:43 ` [Bug regression/58165] " jakub at gcc dot gnu.org
2013-08-15 12:49 ` aivchenk at gmail dot com
@ 2013-08-15 12:56 ` jakub at gcc dot gnu.org
2013-08-15 12:57 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-15 12:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Alexander Ivchenko from comment #4)
> I firstly did something like that:
>
> diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c
> index 9b6186e..5862ebf 100644
> --- a/gcc/tree-call-cdce.c
> +++ b/gcc/tree-call-cdce.c
> @@ -771,6 +771,9 @@ shrink_wrap_one_built_in_call (gimple bi_call)
> join_tgt_in_edge_fall_thru = make_edge (guard_bb0, join_tgt_bb,
> EDGE_FALSE_VALUE);
>
> + if (!gimple_call_nothrow_p (bi_call))
> + make_eh_edges (bi_call);
> +
> bi_call_in_edge0->probability = REG_BR_PROB_BASE * ERR_PROB;
> bi_call_in_edge0->count =
> apply_probability (guard_bb0->count,
>
> which also helped.. but now I see that we shouldn't split the block
Well, that wouldn't be sufficient, you'd need to also remove the EH edges from
the other bb. But not splitting the block means you don't have to bother with
that. Though, thinking about it again, my patch might be problematic for
-fcompare-debug, because we could be not splitting without -g and for -g if a
call is followed by some debug stmts, we could be splitting.
So, I need to use stmt_ends_bb_p instead.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug regression/58165] [4.8/4.9 regression] internal compiler error: verify_flow_info
2013-08-15 7:00 [Bug regression/58165] New: [4.8/4.9 regression] internal compiler error: verify_flow_info aivchenk at gmail dot com
` (2 preceding siblings ...)
2013-08-15 12:56 ` jakub at gcc dot gnu.org
@ 2013-08-15 12:57 ` jakub at gcc dot gnu.org
2013-08-15 13:30 ` aivchenk at gmail dot com
2013-08-16 13:19 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-15 12:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #30661|0 |1
is obsolete| |
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 30662
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30662&action=edit
gcc49-pr58165.patch
Updated patch.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug regression/58165] [4.8/4.9 regression] internal compiler error: verify_flow_info
2013-08-15 7:00 [Bug regression/58165] New: [4.8/4.9 regression] internal compiler error: verify_flow_info aivchenk at gmail dot com
` (3 preceding siblings ...)
2013-08-15 12:57 ` jakub at gcc dot gnu.org
@ 2013-08-15 13:30 ` aivchenk at gmail dot com
2013-08-16 13:19 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: aivchenk at gmail dot com @ 2013-08-15 13:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165
--- Comment #7 from Alexander Ivchenko <aivchenk at gmail dot com> ---
> Well, that wouldn't be sufficient, you'd need to also remove the EH edges
> from the other bb. But not splitting the block means you don't have to
> bother with that.
Well, that's true. We could do that and not give up on cdce, but I guess there
is no much profit in that..
Your fix works for me and the initial issue with bullet lib is also cured (and
reduced testcase shows the problem as well). Thanks =)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug regression/58165] [4.8/4.9 regression] internal compiler error: verify_flow_info
2013-08-15 7:00 [Bug regression/58165] New: [4.8/4.9 regression] internal compiler error: verify_flow_info aivchenk at gmail dot com
` (4 preceding siblings ...)
2013-08-15 13:30 ` aivchenk at gmail dot com
@ 2013-08-16 13:19 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-16 13:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Aug 16 08:57:29 2013
New Revision: 201780
URL: http://gcc.gnu.org/viewcvs?rev=201780&root=gcc&view=rev
Log:
PR tree-optimization/58165
* tree-call-cdce.c (shrink_wrap_one_built_in_call): If
bi_call must be the last stmt in a bb, don't split_block, instead
use fallthru edge from it and give up if there is none.
Release conds vector when returning early.
* g++.dg/opt/pr58165.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/opt/pr58165.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-call-cdce.c
Author: jakub
Date: Fri Aug 16 09:04:52 2013
New Revision: 201781
URL: http://gcc.gnu.org/viewcvs?rev=201781&root=gcc&view=rev
Log:
PR tree-optimization/58165
* tree-call-cdce.c (shrink_wrap_one_built_in_call): If
bi_call must be the last stmt in a bb, don't split_block, instead
use fallthru edge from it and give up if there is none.
Release conds vector when returning early.
* g++.dg/opt/pr58165.C: New test.
Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/opt/pr58165.C
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/tree-call-cdce.c
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-08-16 13:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-15 7:00 [Bug regression/58165] New: [4.8/4.9 regression] internal compiler error: verify_flow_info aivchenk at gmail dot com
2013-08-15 12:43 ` [Bug regression/58165] " jakub at gcc dot gnu.org
2013-08-15 12:49 ` aivchenk at gmail dot com
2013-08-15 12:56 ` jakub at gcc dot gnu.org
2013-08-15 12:57 ` jakub at gcc dot gnu.org
2013-08-15 13:30 ` aivchenk at gmail dot com
2013-08-16 13:19 ` jakub 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).