rorth wrote:

I've run a `sparc-sun-solaris2.11` 2-stage `Debug` build with this patch.  The 
build itself went well (with the exception of an unrelated failure to link 
`libomp.so`), but test results are still terrible with 455 failures.  But it's 
still massive improvement compared to before.

However, when trying an `i386-pc-solaris2.11` `Debug` build, I ran into a build 
failure due to this patch:
```
FAILED: tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o
[...]
In file included from 
/vol/llvm/src/llvm-project/local/clang/lib/CodeGen/CGBuiltin.cpp:13:
In file included from 
/vol/llvm/src/llvm-project/local/clang/lib/CodeGen/CGBuiltin.h:12:
/vol/llvm/src/llvm-project/local/clang/lib/CodeGen/CodeGenFunction.h:951:24: 
error: static assertion failed due to requirement 'alignof((anonymous 
namespace)::CallObjCArcUse) == alignof(clang::CodeGen::RawAddress)': Cleanup 
will be allocated on misaligned address
  951 |                       (alignof(T) == alignof(RawAddress)),
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/vol/llvm/src/llvm-project/local/clang/lib/CodeGen/CodeGenFunction.h:924:14: 
note: in instantiation of function template specialization 
'clang::CodeGen::CodeGenFunction::pushCleanupAfterFullExprWithActiveFlag<(anonymous
 namespace)::CallObjCArcUse, llvm::Value *>' requested here
  924 |       return pushCleanupAfterFullExprWithActiveFlag<T>(
      |              ^
/vol/llvm/src/llvm-project/local/clang/lib/CodeGen/CGBuiltin.cpp:2269:13: note: 
in instantiation of function template specialization 
'clang::CodeGen::CodeGenFunction::pushCleanupAfterFullExpr<(anonymous 
namespace)::CallObjCArcUse, llvm::Value *>' requested here
 2269 |             pushCleanupAfterFullExpr<CallObjCArcUse>(Cleanup, ArgVal);
      |             ^
/vol/llvm/src/llvm-project/local/clang/lib/CodeGen/CodeGenFunction.h:951:35: 
note: expression evaluates to '8 == 4'
  951 |                       (alignof(T) == alignof(RawAddress)),
      |                        ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/vol/llvm/src/llvm-project/local/clang/lib/CodeGen/CodeGenFunction.h:951:24: 
error: static assertion failed due to requirement 
'alignof(clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous 
namespace)::CallObjCArcUse, llvm::Value *>) == 
alignof(clang::CodeGen::RawAddress)': Cleanup will be allocated on misaligned 
address
  951 |                       (alignof(T) == alignof(RawAddress)),
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/vol/llvm/src/llvm-project/local/clang/lib/CodeGen/CodeGenFunction.h:935:5: 
note: in instantiation of function template specialization 
'clang::CodeGen::CodeGenFunction::pushCleanupAfterFullExprWithActiveFlag<clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous
 namespace)::CallObjCArcUse, llvm::Value *>, 
std::tuple<llvm::PointerIntPair<llvm::Value *, 1, bool>>>' requested here
  935 |     pushCleanupAfterFullExprWithActiveFlag<CleanupType>(Kind, 
ActiveFlag,
      |     ^
/vol/llvm/src/llvm-project/local/clang/lib/CodeGen/CGBuiltin.cpp:2269:13: note: 
in instantiation of function template specialization 
'clang::CodeGen::CodeGenFunction::pushCleanupAfterFullExpr<(anonymous 
namespace)::CallObjCArcUse, llvm::Value *>' requested here
 2269 |             pushCleanupAfterFullExpr<CallObjCArcUse>(Cleanup, ArgVal);
      |             ^
/vol/llvm/src/llvm-project/local/clang/lib/CodeGen/CodeGenFunction.h:951:35: 
note: expression evaluates to '8 == 4' 
  951 |                       (alignof(T) == alignof(RawAddress)), 
      |                        ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
```

Besides, I think it would be clearer to use `alignas(uint64_t)` instead of a 
magic constant.

https://github.com/llvm/llvm-project/pull/152866
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to