[LLVMbugs] [Bug 3378] New: Assertion `IsUnsigned == RHS.IsUnsigned && " Signedness mismatch!"' failed

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jan 23 02:43:22 PST 2009


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

           Summary: Assertion `IsUnsigned == RHS.IsUnsigned && "Signedness
                    mismatch!"' failed
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: parser
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bagnara at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu, bolzoni at cs.unipr.it


This bug affects r62839.  The reduced testcase comes from linux-2.4.37.

$ cat /tmp/bug11.c
typedef unsigned int brlock_read_lock_t;

enum brlock_indices {
 BR_GLOBALIRQ_LOCK,
 BR_NETPROTO_LOCK,

 __BR_END
};

brlock_read_lock_t
__brlock_array[(4)][(((sizeof(brlock_read_lock_t)*__BR_END
                       + (1 << ((7)))-1) & ~((1 << ((7)))-1))
                     / sizeof(brlock_read_lock_t))] = {
  [0 ... (4)-1] = {
    [0 ... (((sizeof(brlock_read_lock_t)*__BR_END +
              (1 << ((7)))-1) & ~((1 << ((7)))-1))
            / sizeof(brlock_read_lock_t))-1] = 0
  }
};
$ gcc -c -W -Wall /tmp/bug11.c
$ clang -w /tmp/bug11.c  
clang: /home/roberto/parser/src/include/llvm/ADT/APSInt.h:121: bool
llvm::APSInt::operator<(const llvm::APSInt&) const: Assertion `IsUnsigned ==
RHS.IsUnsigned && "Signedness mismatch!"' failed.
0   clang     0x0000000000d87641
1   libc.so.6 0x0000003e33c32f90
2   libc.so.6 0x0000003e33c32f05 gsignal + 53
3   libc.so.6 0x0000003e33c34a73 abort + 387
4   libc.so.6 0x0000003e33c2bef9 __assert_fail + 233
5   clang     0x000000000082e193
6   clang     0x000000000082e5ff
clang::Sema::ActOnDesignatedInitializer(clang::Designation&,
clang::SourceLocation, bool,
clang::ASTOwningResult<&(clang::ActionBase::DeleteExpr(void*))>) + 1071
7   clang     0x00000000008ddea7
clang::Parser::ParseInitializerWithPotentialDesignator(clang::InitListDesignations&,
unsigned int) + 4551
8   clang     0x00000000008de67e clang::Parser::ParseBraceInitializer() + 702
9   clang     0x00000000008df5c8 clang::Parser::ParseInitializer() + 72
10  clang     0x00000000008dde59
clang::Parser::ParseInitializerWithPotentialDesignator(clang::InitListDesignations&,
unsigned int) + 4473
11  clang     0x00000000008de67e clang::Parser::ParseBraceInitializer() + 702
12  clang     0x00000000008c8418
clang::Parser::ParseInitDeclaratorListAfterFirstDeclarator(clang::Declarator&)
+ 1368
13  clang     0x00000000008c3b8b
clang::Parser::ParseDeclarationOrFunctionDefinition(llvm::SmallVector<void*,
4u>*) + 1339
14  clang     0x00000000008c3f48 clang::Parser::ParseExternalDeclaration() +
104
15  clang     0x00000000008c4386 clang::Parser::ParseTopLevelDecl(void*&) + 22
16  clang     0x00000000007e52db clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, bool, bool) + 219
17  clang     0x0000000000589ad4
18  clang     0x000000000058ea29 main + 1417
19  libc.so.6 0x0000003e33c1e576 __libc_start_main + 230
20  clang     0x000000000054d3e9
Aborted
$


-- 
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