http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51650
--- Comment #12 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-12-22 18:45:24 UTC --- % cat pr51650.ii class nsQueryFrame { }; struct PLDHashEntryHdr { }; template < class > class nsPtrHashKey:PLDHashEntryHdr { }; class nsIFrame; namespace mozilla { struct FramePropertyDescriptor { }; class FramePropertyTable { public: FramePropertyTable ():mLastFrame (), mLastEntry () { } void *Get (nsIFrame *, FramePropertyDescriptor *, bool *); class Entry:nsPtrHashKey < nsIFrame > { }; nsIFrame *mLastFrame; Entry *mLastEntry; }; class FrameProperties { public: FrameProperties ():mTable (), mFrame () { } void *Get (FramePropertyDescriptor * aProperty) { mTable->Get (0, aProperty, 0); } FramePropertyTable *mTable; nsIFrame *mFrame; }; } class nsFrameList; class nsIFrame:nsQueryFrame { public: typedef mozilla::FramePropertyDescriptor FramePropertyDescriptor; typedef mozilla::FrameProperties FrameProperties; virtual nsFrameList GetChildList (); FrameProperties Properties () { } static FramePropertyDescriptor *EmbeddingLevelProperty () { static FramePropertyDescriptor descriptor; return &descriptor; } }; void nsCaretGetCaretFrameForNodeOffset () { nsIFrame *theFrame; theFrame->Properties ().Get (nsIFrame::EmbeddingLevelProperty ()); } % g++ -r -nostdlib -g -flto -O1 pr51650.ii lto1: internal compiler error: in dwarf2out_finish, at dwarf2out.c:22501 Please submit a full bug report, with preprocessed source if appropriate.