g++43 -v output:
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --program-suffix=43 --disable-multilib
--enable-languages=c,c++
Thread model: posix
gcc version 4.3.0 20070929 (experimental) (GCC)
Built from svn trunk, revision 128885
Compiling this with -O2 or -O3 fails with the following message:
verify_flow_info_failed.cpp: In function 'void somefunction()':
verify_flow_info_failed.cpp:29: error: BB 2 last statement has incorrectly set
region
verify_flow_info_failed.cpp:29: internal compiler error: verify_flow_info
failed
struct base
{
void somemethod() {}
};
struct derived : public base
{
};
struct smartpointer
{
~smartpointer()
{
}
operator derived*() const
{
return 0;
}
};
typedef void ( derived::* methodptr_type )();
methodptr_type getmemberptr()
{
return &derived::somemethod;
}
void somefunction()
{
smartpointer pObj;
( pObj->*getmemberptr() )();
}
--
Summary: [4.3 regression] ICE on valid code at -O2:
verify_flow_info failed
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: a dot chavasse at gmail dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33589