I have a loop like this: i = 0; ... while (i < s.length && s[i] != '"') { ... tmp ~= s[i]; ++i; } Usually it works great. When I use the -O flag, it sometimes crashes, but if I write it like this: char c; ... tmp ~= c = s[i]; ... then it works great again. I don't see any reason for this strange behavior, except of optimizer's tricks.
Sorry for mistake. It's -release option's blame, but it's still a bug :)
Create a complete example showing the problem. Otherwise this will never get fixed.
This is probably just incorrect code, with memory corruption, and it's just "luck" that it works without -release. Marking as invalid since there's no test case, and there's an probable explanation which doesn't involve a compiler bug.