[LLVMbugs] [Bug 8619] New: Assertion failed: (ConfluenceBlock->pred_size() == 2), function VisitConditionalOperator, file /Volumes/Data/g/clang/lib/Analysis/CFG.cpp, line 1207.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Nov 15 13:33:34 PST 2010


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

           Summary: Assertion failed: (ConfluenceBlock->pred_size() == 2),
                    function VisitConditionalOperator, file
                    /Volumes/Data/g/clang/lib/Analysis/CFG.cpp, line 1207.
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: stoklund at 2pi.dk
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=5782)
 --> (http://llvm.org/bugs/attachment.cgi?id=5782)
Test case from PR 8604

$ Release+Asserts/bin/clang -v
clang version 2.9 (trunk 119181)
Target: x86_64-apple-darwin10
Thread model: posix


$ Release+Asserts/bin/clang -O3 small.c 
small.c:3:19: warning: unknown attribute '__' ignored [-Wunknown-attributes]
  __attribute__ ((__)) __attribute__ ((__noreturn__));
                  ^
small.c:80:8: warning: incompatible pointer types initializing 'short *' with
an expression of type 'unsigned char *'
short *g_94 = &g_20[2];
       ^      ~~~~~~~~
small.c:93:5: warning: excess elements in struct initializer
  , 0
    ^
small.c:91:3: warning: implicit conversion from 'long long' to 'unsigned char'
changes value from 1717085005141872818 to 178 [-Wconstant-conversion]
  0x17D44FB6F4A190B2LL, {
  ^~~~~~~~~~~~~~~~~~~~
small.c:107:14: warning: incompatible pointer types initializing 'const short
*' with an expression of type 'unsigned char *'
const short *g_428 = &g_429[0];
             ^       ~~~~~~~~~
small.c:111:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
int321 (void)
^~~~~~
small.c:120:16: warning: comparison of distinct pointer types ('const short *'
and 'unsigned char *')
      && g_428 <= &g_429[1] ? : _fail ("", "rand005597.c",
         ~~~~~ ^  ~~~~~~~~~
small.c:120:33: warning: implicit declaration of function '_fail' is invalid in
C99 [-Wimplicit-function-declaration]
      && g_428 <= &g_429[1] ? : _fail ("", "rand005597.c",
                                ^
small.c:125:22: warning: implicit declaration of function 'safe' is invalid in
C99 [-Wimplicit-function-declaration]
  for (0; 1; l_366 = safe (l_366, 1))
                     ^
small.c:132:12: warning: incompatible pointer to integer conversion passing
'int (struct S6 ***const, signed char, unsigned int)' to parameter of type
'unsigned long long'
           func_78) >= (func_82 (g_114[1], g_252.f2.f0,
           ^~~~~~~
small.c:30:49: note: passing argument to parameter 'ui2' here
biz (unsigned long long ui1, unsigned long long ui2)
                                                ^
small.c:132:25: warning: implicit declaration of function 'func_82' is invalid
in C99 [-Wimplicit-function-declaration]
           func_78) >= (func_82 (g_114[1], g_252.f2.f0,
                        ^
small.c:137:15: warning: comparison of distinct pointer types ('short *' and
'unsigned char *')
      && g_94 <= &g_20[6] ? : __assert_fail ("", "rand005597.c", 757,
         ~~~~ ^  ~~~~~~~~
small.c:125:8: warning: expression result unused [-Wunused-value]
  for (0; 1; l_366 = safe (l_366, 1))
       ^
Assertion failed: (ConfluenceBlock->pred_size() == 2), function
VisitConditionalOperator, file /Volumes/Data/g/clang/lib/Analysis/CFG.cpp, line
1207.
0  clang             0x0000000100f81312 PrintStackTrace(void*) + 34
1  clang             0x0000000100f818b9 SignalHandler(int) + 857
2  libSystem.B.dylib 0x00007fff88fcb67a _sigtramp + 26
3  libSystem.B.dylib 0x0000000101917da0 _sigtramp + 2023016256
4  clang             0x000000010001cba6 abort + 22
5  clang             0x000000010001cb68 __assert_rtn + 56
6  clang             0x000000010050d467 (anonymous
namespace)::CFGBuilder::Visit(clang::Stmt*, (anonymous
namespace)::AddStmtChoice) + 18999
7  clang             0x000000010050d872 (anonymous
namespace)::CFGBuilder::VisitCompoundStmt(clang::CompoundStmt*) + 226
8  clang             0x000000010050c8ad (anonymous
namespace)::CFGBuilder::Visit(clang::Stmt*, (anonymous
namespace)::AddStmtChoice) + 15997
9  clang             0x000000010050ba63 (anonymous
namespace)::CFGBuilder::Visit(clang::Stmt*, (anonymous
namespace)::AddStmtChoice) + 12339
10 clang             0x000000010050b136 (anonymous
namespace)::CFGBuilder::Visit(clang::Stmt*, (anonymous
namespace)::AddStmtChoice) + 9990
11 clang             0x000000010050d872 (anonymous
namespace)::CFGBuilder::VisitCompoundStmt(clang::CompoundStmt*) + 226
12 clang             0x000000010050c8ad (anonymous
namespace)::CFGBuilder::Visit(clang::Stmt*, (anonymous
namespace)::AddStmtChoice) + 15997
13 clang             0x000000010050330c clang::CFG::buildCFG(clang::Decl
const*, clang::Stmt*, clang::ASTContext*, clang::CFG::BuildOptions) + 1676
14 clang             0x000000010050082a clang::AnalysisContext::getCFG() + 218
15 clang             0x00000001002710c6
clang::sema::AnalysisBasedWarnings::IssueWarnings(clang::sema::AnalysisBasedWarnings::Policy,
clang::Decl const*, clang::QualType) + 1542
16 clang             0x00000001002ee193
clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) + 2067
17 clang             0x000000010026640e
clang::Parser::ParseFunctionStatementBody(clang::Decl*) + 142
18 clang             0x000000010026eb24
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) + 548
19 clang             0x000000010023f452
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*) + 770
20 clang             0x000000010026e5f8
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AttributeList*, clang::AccessSpecifier) + 776
21 clang             0x000000010026e793
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::AttributeList*,
clang::AccessSpecifier) + 339
22 clang             0x000000010026deee
clang::Parser::ParseExternalDeclaration(clang::CXX0XAttributeList,
clang::Parser::ParsingDeclSpec*) + 2302
23 clang             0x000000010026d5dd
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 205
24 clang             0x000000010023a2e0 clang::ParseAST(clang::Sema&, bool) +
720
25 clang             0x0000000100206667 clang::CodeGenAction::ExecuteAction() +
823
26 clang             0x00000001000453d7
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 871
27 clang             0x0000000100024d25
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2757
28 clang             0x000000010001e39f cc1_main(char const**, char const**,
char const*, void*) + 5583
29 clang             0x00000001000216df main + 735
30 clang             0x000000010001cdc4 start + 52
Stack dump:
0.    Program arguments: /Volumes/Data/b/Release+Asserts/bin/clang -cc1 -triple
x86_64-apple-darwin10.0.0 -emit-obj -disable-free -main-file-name small.c
-pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 97.17 -resource-dir
/Volumes/Data/b/Release+Asserts/bin/../lib/clang/2.9 -O3 -ferror-limit 19
-fmessage-length 236 -stack-protector 1 -fblocks -fdiagnostics-show-option
-fcolor-diagnostics -o
/var/folders/7i/7ikIVQ+1FxmS1CawLKGczU+++TI/-Tmp-/cc-kFZsN1.o -x c small.c 
1.    small.c:144:1: current parser token 'int'
2.    small.c:112:1: parsing function body 'int321'
clang: error: unable to execute command: Illegal instruction
clang: error: clang frontend command failed due to signal 1 (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