Sign in to follow this  

Possible bug: as_compiler.cpp and duplicated branch in if/else

This topic is 2281 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've found a duplicated branch for the if/else statement in [b]as_compiler.cpp[/b]. It's in line 8584 in AngelScript version 2.21.2:

[code]
if( ctx->property_get )
func = engine->scriptFunctions[ctx->property_get];
else
func = engine->scriptFunctions[ctx->property_get];[/code]
It's located inside else if( op == ttOpenBracket ) statement.

Share this post


Link to post
Share on other sites
Not sure whether that's related or not, but.. http://angelscript.jeremyh.net/builders/Full-Linux-64%20Optimized%28-O2%29/builds/13

Share this post


Link to post
Share on other sites
No, it's not related. The problem that is causing the buildbot to fail is when compiling with -O2 flag on Linux 64bit. For some reason that I have yet to figure out, the gnuc compiler optimizations invalidates the code in the as_callfunc_x64_gcc.cpp file. I think I've managed to get it to work with returning normal floats or doubles, but it is still failing when returning a POD structure with floats. Like the vector3 structure that you're using in your project.

I believe it is just a minor adjustment that is needed to the code to protect it against the optimizations, but without a way to actually debug the code myself it has been very hard to figure out.

Share this post


Link to post
Share on other sites
You are more than welcome to use my server, if you are willing to use command line. Just PM me if you would like access.

Share this post


Link to post
Share on other sites
Sign in to follow this