hubert.reinterpretcast added inline comments.

================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1887
+      if (BTy->isFloatingPoint()) {
+        PreferredAlign = FieldSize;
+      }
----------------
I tried `clang -cc1 -triple powerpc-ibm-aix -fsyntax-only` with
<stdin>:
```
struct A {
  struct B {
    double d[3];
  } b;
};

extern char x[__alignof__(struct A)];
extern char x[8];
```

I got an assertion failure:
```
clang: /src/clang/lib/AST/RecordLayoutBuilder.cpp:2078: void 
{anonymous}::ItaniumRecordLayoutBuilder::UpdateAlignment(clang::CharUnits, 
clang::CharUnits, clang::CharUnits): Assertion 
`llvm::isPowerOf2_64(PreferredNewAlignment.getQuantity()) && "Alignment not a 
power of 2"' failed.
```



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79719/new/

https://reviews.llvm.org/D79719



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to