------- Comment #4 from jongampark at sbcglobal dot net  2008-05-21 03:00 
-------
(In reply to comment #1)
> Actually I don't think this is a bug.  What is happening is the id is a 
> generic
> class type so the compiler needs to decide at compile time what the type is
> being returned.  In this case it decides on the one the user did not want.  
> The
> cast will chose the correct one.  Now at runtime is selects the correct type
> but of course by the time you get there it is already messed up.
> 
> -- Pinski
> 

That was my first idea. So, that is why I tested if correct method is called,
and it returns things correctly. Once it knows what value to return and through
which register, I guess it means just the interpretation of the returned data.
So, I tried casting the returned value to float. But it didn't fix the problem.
The only way to fix it is to cast the pointer to the object of which method is
called.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36283

Reply via email to