The following valid code snippet triggers an ICE on mainline when compiled
with "-O -ftest-coverage":

=======================================================
struct A
{
  int i;
  int& get() { return i; }
};

inline A foo()
{
  A a;
  a.get();
  return a;
}

inline A bar()
{
  return foo();
}

void baz()
{
  A a;
  a = bar();
}
=======================================================

bug.cc: In function 'void baz()':
bug.cc:23: error: address taken, but ADDRESSABLE bit not set
D.1698

bug.cc:23: internal compiler error: verify_stmts failed
Please submit a full bug report, [etc.]


-- 
           Summary: [4.3 regression] ICE with "-ftest-coverage" and
                    references
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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

Reply via email to