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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-05 
11:21:35 UTC ---
slightly further reduced:

template<typename T> struct RefPtr {
        ~RefPtr();

        T *operator->() const;
};

struct Message  {
        typedef RefPtr<Message> Ptr;

        static Ptr create(int);
};


struct Recipient  {
        typedef RefPtr<Recipient> Ptr;

        static const int byte_count = 80;
};


Recipient::Ptr recipient();

void flush()
{
    char buffer[(recipient()->byte_count)];

    {
        Message::Ptr msg = Message::create(sizeof(buffer));
    }
}


This is a regression as it compiles OK with GCC 4.1

Reply via email to