Skip to content

Assertion `IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"' #4144

@llvmbot

Description

@llvmbot
Bugzilla Link 3772
Resolution FIXED
Resolved on Oct 31, 2012 19:59
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @tkremenek

Extended Description

SVN Revision: 66539

cat clang_crash_RlE2c6.i
typedef struct st ST;

struct st {
char *name;
};

extern ST *Cur_Pu;

void Range_Analysis()
{
static ST *last_Cur_Pu;
if (last_Cur_Pu == Cur_Pu) {
}
}

gcc -c clang_crash_RlE2c6.i
clang -x c -analyze -checker-cfref clang_crash_RlE2c6.i
clang: [...]/clang/llvm/include/llvm/ADT/APSInt.h:129: bool llvm::APSInt::operator<=(const llvm::APSInt&) const: Assertion `IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"' failed.
[...]

The assertion isn't triggered when moving the static variable 'last_Cur_Pu' outside of function Range_Analysis().

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions