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 middle-end/39509] [4.3/4.4/4.5 Regression] bad optimization(?) pure virtual function call with -O2



------- Comment #13 from jakub at gcc dot gnu dot org  2009-05-12 18:56 -------
In 4.4.0/x86_64-linux at -O2 at least the problem seems to be that in:
_ZNK5boost9xpressive6detail17xpression_adaptorINS1_16static_xpressionINS1_17alternate_matcherINS1_15alternates_listINS3_INS1_13regex_matcherIN9__gnu_cxx17__normal_iteratorIPKcSsEEEENS3_INS1_21alternate_end_matcherENS1_7no_nextEEEEENS5_ISG_NS_6fusion3nilEEEEENS0_16cpp_regex_traitsIcEEEENS3_INS1_11end_matcherESE_EEEENS1_12matchable_exISB_EEE5matchERNS1_11match_stateISB_EE
adaptor is destructed before the push_context_match call. In *.optimized dump
we have:
<bb 9>:
  adaptor.D.166953._vptr.matchable =
&_ZTVN5boost9xpressive6detail17xpression_adaptorINS_17reference_wrapperIKNS1_17stacked_xpressionINS1
_16static_xpressionINS1_11end_matcherENS1_7no_nextEEENS5_INS1_21alternate_end_matcherES7_EEEEEENS1_9matchableIN9__gnu_cxx17__normal_itera
torIPKcSsEEEEEE[2];
  adaptor.xpr_.t_ = (const struct stacked_xpression *) (const struct
stacked_xpression &) &this->xpr_.D.142582.alternates_.D.142415.cdr.D
.142229.car.next_;
  adaptor.D.166953._vptr.matchable =
&_ZTVN5boost9xpressive6detail9matchableIN9__gnu_cxx17__normal_iteratorIPKcSsEEEE[2];
  D.187198 = push_context_match
(&this->xpr_.D.142582.alternates_.D.142415.cdr.D.142229.car.D.142156.impl_,
state, &adaptor.D.166953);
  goto <bb 11>;


-- 


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


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