[LLVMbugs] [Bug 10336] New: Assertion `unsignedRange.NonNegative && "unsigned range includes negative?"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 11 21:36:23 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10336

           Summary: Assertion `unsignedRange.NonNegative && "unsigned
                    range includes negative?"' failed.
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu


[regehr at gamow tmp039]$ clang -v

clang version 3.0 (trunk 134918)
Target: x86_64-unknown-linux-gnu
Thread model: posix

[regehr at gamow tmp039]$ cat small.c

int * g_610;

static
func_57 (long p_62)
{
  unsigned **l_499;
  *g_610 == (**l_499 ^= p_62);
}

main (void)
{
  return 0;
}

[regehr at gamow tmp039]$ clang -O0 small.c

small.c:4:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
func_57 (long p_62)
^
clang: SemaChecking.cpp:2865: void<unnamed>::AnalyzeComparison(clang::Sema&,
clang::BinaryOperator*): Assertion `unsignedRange.NonNegative && "unsigned
range includes negative?"' failed.
0  clang           0x0000000001a7097f
1  clang           0x0000000001a72bf2
2  libpthread.so.0 0x00007ffff7bcf8f0
3  libc.so.6       0x00007ffff6ebea75 gsignal + 53
4  libc.so.6       0x00007ffff6ec25c0 abort + 384
5  libc.so.6       0x00007ffff6eb7941 __assert_fail + 241
6  clang           0x0000000000997d69
7  clang           0x0000000000a96ed0
clang::Sema::ActOnFinishFullExpr(clang::Expr*) + 128
8  clang           0x000000000091a429
clang::Parser::ParseExprStatement(clang::ParsedAttributes&) + 137
9  clang           0x0000000000917da3
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 2355
10 clang           0x00000000009157e5
clang::Parser::ParseCompoundStatementBody(bool) + 1605
11 clang           0x0000000000915da8
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 168
12 clang           0x000000000092b755
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) + 1909
13 clang           0x0000000000938da8
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1992
14 clang           0x00000000009290e9
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 153
15 clang           0x0000000000929572
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 530
16 clang           0x000000000092cec5
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2229
17 clang           0x000000000092d26c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 156
18 clang           0x000000000090873d clang::ParseAST(clang::Sema&, bool) + 285
19 clang           0x00000000007c6b54 clang::CodeGenAction::ExecuteAction() +
68
20 clang           0x00000000006abb73
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 371
21 clang           0x0000000000693970
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1328
22 clang           0x0000000000689738 cc1_main(char const**, char const**, char
const*, void*) + 840
23 clang           0x00000000006927bb main + 7131
24 libc.so.6       0x00007ffff6ea9c4d __libc_start_main + 253
25 clang           0x00000000006888c9
Stack dump:
0.    Program arguments:
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r134918-install/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name small.c -mrelocation-model static -mdisable-fp-elim
-masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64
-target-linker-version 2.20.1 -momit-leaf-frame-pointer -resource-dir
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r134918-install/bin/../lib/clang/3.0
-O0 -ferror-limit 19 -fmessage-length 80 -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/cc-6LjbVZ.o -x c small.c 
1.    small.c:8:1: current parser token '}'
2.    small.c:5:1: parsing function body 'func_57'
3.    small.c:5:1: in compound statement ('{}')
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list