[LLVMbugs] [Bug 7827] New: Clang bug with C99 array as parameter

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Aug 5 09:20:43 PDT 2010


           Summary: Clang bug with C99 array as parameter
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bertsch at iss.rwth-aachen.de
                CC: llvmbugs at cs.uiuc.edu

(as reported on cfe-dev on 08/03/10:)

With clang trunk (r110038) the following call fails:
clang test.c

with test.c:
void function(short width, int data[][width]) {}
void test() {
     function(1, 0);

I get an assertion in CodeGen:
/clang_trunk/cmake/bin/clang test.c
clang: /clang_trunk/llvm/tools/clang/lib/CodeGen/CGExpr.cpp:1167:
clang::DeclRefExpr*): Assertion `V && "DeclRefExpr not entered in
LocalDeclMap?"' failed.
Stack dump:
0.      Program arguments: /clang_trunk/cmake/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -S -disable-free -main-file-name test.c
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -resource-dir
/clang_trunk/cmake/lib/clang/2.8 -ferror-limit 19 -fmessage-length 80
-fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/cc-CFGwvn.s -x c test.c
1.      <eof> parser at end of file
2.      test.c:2:6: LLVM IR generation of declaration 'test'
3.      test.c:2:6: Generating code for declaration 'test'
4.      test.c:2:13: LLVM IR generation of compound statement ('{}')
clang: error: clang frontend command failed due to signal 6 (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