CTSRD-CHERI / clang

DO NOT USE. Use llvm-project instead
Other
9 stars 8 forks source link

Alignment builtins assertion crash. #183

Closed qwattash closed 6 years ago

qwattash commented 6 years ago

When using __builtinalign{up, down}(x, y) with sizeof(y) > sizeof(x) the compiler fails with an assertion error. This is the assertion I am failing:

Assertion failed: (C->getType()->getScalarSizeInBits() < Ty->getScalarSizeInBits()&& "SrcTy must be smaller than DestTy for ZExt!"), function getZExt, file /home/am2419/git/llvm/lib/IR/Constants.cpp, line 1580.

This is a minimal test case to reproduce the error: gist