This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/49615] internal compiler error: verify_stmts failed / LHS in noreturn call with pointer-to-never-returning-member


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]