https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69077

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is the simplified testcase:
t.h:
struct cStdDev
{
  long ns;
  virtual double mean() const {  return ns;  }
};

t1.cc:
#include "t.h"
struct cWeightedStdDev : public cStdDev {
  virtual int netPack();
};
int cWeightedStdDev::netPack() { }

t2.cc:
#include "t.h"
struct sf
{
  void recordScalar(double value);
  cStdDev eedStats;
  virtual void finish();
};
void sf::finish() {
  recordScalar(eedStats.mean());
}

--- CUT ----
# g++ -flto -c -O3 -g t1.cc t2.cc
# g++ -flto  -O3 -g -r -nostdlib t1.o t2.o
t2.cc: In member function 'finish':
t2.cc:10:1: internal compiler error: in gen_inlined_subroutine_die, at
dwarf2out.c:21329
 }
 ^

0x6b67bf gen_inlined_subroutine_die
        /home/apinski/src/local/gcc/gcc/dwarf2out.c:21328
0x6b67bf gen_block_die
        /home/apinski/src/local/gcc/gcc/dwarf2out.c:22813
0x69ba1b decls_for_scope
        /home/apinski/src/local/gcc/gcc/dwarf2out.c:22886
0x69c067 gen_subprogram_die
        /home/apinski/src/local/gcc/gcc/dwarf2out.c:20601
0x69a28f gen_decl_die
        /home/apinski/src/local/gcc/gcc/dwarf2out.c:23293
0x69aeb7 dwarf2out_decl
        /home/apinski/src/local/gcc/gcc/dwarf2out.c:23776
0x69b3a3 dwarf2out_function_decl
        /home/apinski/src/local/gcc/gcc/dwarf2out.c:23791
0x71123b rest_of_handle_final
        /home/apinski/src/local/gcc/gcc/final.c:4473
0x71123b execute
        /home/apinski/src/local/gcc/gcc/final.c:4515
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/home/apinski/local-binutils-gdb/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

Reply via email to