Skip to content

"Invalid constantexpr bitcast!" assert with reinterpret_cast #9930

@efriedma-quic

Description

@efriedma-quic
Bugzilla Link 9558
Resolution FIXED
Resolved on Oct 24, 2011 17:26
Version unspecified
OS Linux
CC @rjmccall

Extended Description

Testcase:
float y = reinterpret_cast<const float&>("asd");

Crashes with assert:
clang: Constants.cpp:1415: static llvm::Constant* llvm::ConstantExpr::getBitCast(llvm::Constant*, const llvm::Type*): Assertion `CastInst::castIsValid(Instruction::BitCast, C, DstTy) && "Invalid constantexpr bitcast!"' failed.

Issue found by inspection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:codegenIR generation bugs: mangling, exceptions, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions