http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49615

--- Comment #1 from Harald van Dijk <harald at gigawatt dot nl> 2011-07-02 
20:35:39 UTC ---
Actually, I'll include the other slightly different testcase here, since it'll
probably be the same problem. If you prefer me reporting it as a separate bug,
I will do so.

$ cat bug.ii
template <class T>
static inline bool Dispatch (T* obj, void (T::*func) ())
{
    (obj->*func) ();
}
class C
{
    bool f (int);
    void g ();
};
bool C::f (int n)
{
    bool b;
    switch (n)
    {
    case 0:
        b = Dispatch (this, &C::g);
    case 1:
        b = Dispatch (this, &C::g);
    }
}
void C::g ()
{
    for (;;) { }
}
$ gcc -c -O bug.ii # works
$ gcc -c -O bug.ii -g
bug.ii: In member function ‘bool C::f(int)’:
bug.ii:11:6: error: control flow in the middle of basic block 4
bug.ii:11:6: internal compiler error: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to