![]() |
|
Issue with the Apple LLVM compiler 3.0... - Printable Version +- iDevGames Forums (http://www.idevgames.com/forums) +-- Forum: Development Zone (/forum-3.html) +--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html) +--- Thread: Issue with the Apple LLVM compiler 3.0... (/thread-9606.html) |
Issue with the Apple LLVM compiler 3.0... - Jamie W - Dec 8, 2011 10:48 AM Hello, Is anyone else having issues with the Apple LLVM compiler 3.0? (iOS Xcode 4.2). I've just had (something like) the following C++ code running: void Class::Function() { WORD Var; Var = m_Var++; // do something with Var.. } Okay, so m_Var is a member of class 'Class'. When I run this code, compiled with the Apple LLVM compiler 3.0, Var is set, but m_Var is not incremented. When I switch to the LLVM GCC 4.2 compiler, it works (is incremented). What's going on? Is the Apple LLVM compiler 3.0 buggy? RE: Issue with the Apple LLVM compiler 3.0... - Jamie W - Dec 8, 2011 12:21 PM Just to expand a little... It all works fine when I compile with GCC (arm6 and arm7) or LLVM - arm7. It only doesn't work when I compile with LLVM - arm6. RE: Issue with the Apple LLVM compiler 3.0... - Frank C. - Dec 8, 2011 01:29 PM I hear there are problems on armv6 when thumb is enabled and optimizations are set higher than -O0. RE: Issue with the Apple LLVM compiler 3.0... - Jamie W - Dec 8, 2011 01:33 PM Hi Frank, I had it on optimization level 0 (debug). Anyhow, it turns out it is a bug in the ARM6 code generated by LLVM (relating to the indexes for accessing class variables). Have filed a bug report with Apple. If it wasn't for older devices, I could just do away with ARM6. I wonder what % of active devices (people buying games) are ARM6 these days? Are there any stats on that? RE: Issue with the Apple LLVM compiler 3.0... - OneSadCookie - Dec 8, 2011 04:43 PM This wasn't thumb code by the way. The bug was to do with storing to an ivar more than some number of bytes into an object. |