Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed: "Computed __func__ length differs from type!" #17801

Closed
llvmbot opened this issue Oct 1, 2013 · 2 comments
Closed

Assertion failed: "Computed __func__ length differs from type!" #17801

llvmbot opened this issue Oct 1, 2013 · 2 comments
Labels
bugzilla Issues migrated from bugzilla clang:codegen IR generation bugs: mangling, exceptions, etc.

Comments

@llvmbot
Copy link
Member

llvmbot commented Oct 1, 2013

Bugzilla Link 17427
Resolution FIXED
Resolved on Oct 09, 2014 04:07
Version trunk
OS Linux
Attachments code, output, etc.
Reporter LLVM Bugzilla Contributor
CC @alexey-bataev

Extended Description

Compile the attached ouch.cc with "clang++ --std=c++1y ouch.cc" (with "clang version 3.4 (trunk 191640)") and the following assertion fails:

clang: /users/j3parker/src/llvm/tools/clang/lib/CodeGen/CGExpr.cpp:1984: clang::CodeGen::LValue clang::CodeGen::CodeGenFunction::EmitPredefinedLValue(const clang::PredefinedExpr *): Assertion `cast<ConstantArrayType (E->getType())->getSize() - 1 == FunctionName.size() && "Computed func length differs from type!"' failed.

However, if you change the name of the type "cat" to "lynx" (the feline, not the browser!) then the assertion will not fail. (See the included ouch2.cpp)

@llvmbot
Copy link
Member Author

llvmbot commented Jan 16, 2014

fyi. This appears to be an issue on the 3.5 trunk too (seen with a different codebase, but the same assert triggering).

Is there an alternate clang assertion macro that can be used here to print the variables being compared along with the assertion message itself?

@llvmbot
Copy link
Member Author

llvmbot commented Feb 24, 2014

fyi. It looks like erik olofsson, points out the specific commit that introduces this issue:

http://llvm-reviews.chandlerc.com/D1491#comment-7

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:codegen IR generation bugs: mangling, exceptions, etc.
Projects
None yet
Development

No branches or pull requests

1 participant