Open elsid opened 9 months ago
@llvm/issue-subscribers-backend-x86
Author: Roman Siromakha (elsid)
When I run the IR through llc I get this error
./bin/llc: error: ./bin/llc: test.ll:2123:128: error: invalid cast opcode for cast from '[14 x i8]' to 'ptr'
invoke void @_ZNSt16invalid_argumentC2B8ne190000EPKc(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull bitcast ([14 x i8] c"a/foo/bar/baz\00" to ptr))
So the IR is malformed before it reaches the backend.
Switching to an assertions build fails in clang https://godbolt.org/z/4b6EGq7s3
clang++: /root/llvm-project/clang/lib/CodeGen/CGCall.cpp:4660: void clang::CodeGen::CodeGenFunction::EmitCallArg(clang::CodeGen::CallArgList&, const clang::Expr*, clang::QualType): Assertion `type->isReferenceType() == E->isGLValue() && "reference binding to unmaterialized r-value!"' failed.
@llvm/issue-subscribers-clang-codegen
Author: Roman Siromakha (elsid)
Compiler output:
Mentioned files: testpathutil-d50ae4.zip
Not preprocessed code (https://github.com/google/googletest/releases/tag/release-1.12.1 is used):
The same code on the compiler explorer causing the error for comparison with other compilers: https://godbolt.org/z/Kd81djbds