https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118891
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |needs-bisection, | |needs-reduction, | |needs-source --- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to marcus from comment #5) > > So stage 1 compiler is miscompiling stage 2. > > Hm, isn't it the stage 2 compiler which is miscompiling libstdc++? > It's running .../build/./gcc/xgcc, not .../build/./prev-gcc/xgcc By miscompiling I mean produced incorrect code. Because stage1 compiler is able to compile stacktrace.cc just fine. So cc1plus from stage2 is bad and is bad since stage1 cc1plus has produced wrong code for it. Most likely the option code is being miscompiled as you mentioned optimize attribute is required to get the error message.