Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

failed assert: Duplicate empty class detected #6792

Closed Quuxplusone closed 13 years ago

Quuxplusone commented 13 years ago
Bugzilla Link PR8796
Status RESOLVED FIXED
Importance P normal
Reported by Rafael Ávila de Espíndola (rafael@espindo.la)
Reported on 2010-12-15 20:01:43 -0800
Last modified on 2010-12-29 17:20:31 -0800
Version unspecified
Hardware PC All
CC andersca@icloud.com, llvm-bugs@lists.llvm.org, rjmccall@apple.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Running "clang -cc1 -S foo.ii" on

struct FreeCell {
};
union ThingOrCell {
  FreeCell t;
  FreeCell cell;
};
 struct Things {
  ThingOrCell things;
};
 struct Arena {
   union {
     int y;
   };
   Things t;
};
struct Arena x;

Fails with

Assertion failed: (std::find(Classes.begin(), Classes.end(), RD) ==
Classes.end() && "Duplicate empty class detected!"), function
AddSubobjectAtOffset, file
/Users/espindola/llvm/clang/lib/AST/RecordLayoutBuilder.cpp, line 221.
Quuxplusone commented 13 years ago
Reduced a bit:

struct FreeCell {
};
union ThingOrCell {
  FreeCell t;
  FreeCell cell;
};
struct Things {
  ThingOrCell things;
};
Things x;
Quuxplusone commented 13 years ago

Fixed in r122633.