Issue with the Apple LLVM compiler 3.0...
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?
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?
Blog - http://bit.ly/mrqwak
Games - http://bit.ly/mrqwakgames
Twitter - http://www.twitter.com/mrqwak
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.
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.
Blog - http://bit.ly/mrqwak
Games - http://bit.ly/mrqwakgames
Twitter - http://www.twitter.com/mrqwak
I hear there are problems on armv6 when thumb is enabled and optimizations are set higher than -O0.
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?
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?
Blog - http://bit.ly/mrqwak
Games - http://bit.ly/mrqwakgames
Twitter - http://www.twitter.com/mrqwak
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| what compiler for iPhone OS 3.0? | captainfreedom | 4 | 4,893 |
Dec 21, 2010 02:37 AM Last Post: Frank C. |
|
| Accessing the GCC compiler flags | Madrayken | 6 | 5,325 |
Sep 19, 2009 01:18 AM Last Post: OneSadCookie |
|

