Sign in to follow this  

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

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:

if( ctx->property_get )
func = engine->scriptFunctions[ctx->property_get];
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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this