[LLVMbugs] [Bug 8742] New: assert in clang after commit r120890 when compiling some valid obj-c code.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Dec 6 02:28:05 PST 2010


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

           Summary: assert in clang after commit r120890 when compiling
                    some valid obj-c code.
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: devlists at shadowlab.org
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=5874)
 --> (http://llvm.org/bugs/attachment.cgi?id=5874)
File that clang cannot compile

r120890 by rjmccall, 04:47
“Although we currently have explicit lvalue-to-rvalue conversions, they're not
actually frequently used, because ImpCastExprToType only creates a node if the
types differ…”

After this commit, clang asserts while compiling the following code.

-----------------------
extern int printf(const char *, ...);

@interface WBGradientStep  {}
@property float start;
@end

void wb_checkLocation() {
  WBGradientStep *step = 0;
  printf("%.2f", step.start);
}

----------------------
> clang --version
clang version 2.9 (trunk 120890)
Target: x86_64-apple-darwin10
Thread model: posix

> clang -c test.m
Assertion failed: (E->getObjectKind() == OK_Ordinary && "reached property
reference without lvalue-to-rvalue"), function VisitObjCPropertyRefExpr, file
/Volumes/MacPro/Projects/OpenSource/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp,
line 241.
0  clang             0x0000000100e68a62 PrintStackTrace(void*) + 34
1  clang             0x0000000100e69009 SignalHandler(int) + 857
2  libSystem.B.dylib 0x00007fff8326667a _sigtramp + 26
3  libSystem.B.dylib 000000000000000000 _sigtramp + 2094635424
4  clang             0x0000000100011a76 abort + 22
5  clang             0x0000000100011a38 __assert_rtn + 56
6  clang             0x000000010019d9e9 clang::StmtVisitor<(anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 41449
7  clang             0x000000010019f7e6 (anonymous
namespace)::ScalarExprEmitter::EmitCastExpr(clang::CastExpr*) + 4550
…

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