[Bug lto/42653] New: ICE with -g and -flto (requires both flags to crash)

baldrick at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jan 7 20:19:00 GMT 2010


$ g++ -c -flto -g fltog.ii
fltog.ii: In member function ‘MCIListener’:
fltog.ii:25:3: internal compiler error: tree check: expected class ‘type’, have
‘declaration’ (function_decl) in gen_type_die_with_usage, at dwarf2out.c:18747

Occurs with top-of-tree g++-4.5.

Testcase fltog.ii:

namespace llvm
{
  class Function;
  class MachineCodeInfo;
  class ExecutionEngine
  {
  };
  class JIT:public ExecutionEngine
  {
    void runJITOnFunction (Function * F, MachineCodeInfo * MCI = 0);
  };
  class JITEventListener
  {
  public:JITEventListener ()
    {
    } virtual ~JITEventListener ();
  };
}

using namespace llvm;
void
JIT::runJITOnFunction (Function * F, MachineCodeInfo * MCI)
{
  class MCIListener:public JITEventListener
  {
    MachineCodeInfo *const MCI;
  public:  MCIListener (MachineCodeInfo * mci):MCI (mci)
    {
  }};
}


-- 
           Summary: ICE with -g and -flto (requires both flags to crash)
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: baldrick at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



More information about the Gcc-bugs mailing list