>Right. When sizeof (struct X) < 58, GCC inlines the clearing of thestruct,
>using a bunch of clr instructions. But when the struct is larger than the
>threshold you've identified, it creates a global const temporary with the
>value you want, and initialises thestruct with bcopy (i.e. memcopy):
>
> pea .temporary(%pc)
> bsr.w bcopy
>
>But in this case, the temporary is in the global data (!), not the text
>section. So the pea should be "pea .temporary@END(%a5)", and this is
>indeed another example of the "Const objects + no optimization => crash"
>bug, except that you've found an instance that is not fixed by turning
>on the optimizer. Congratulations.
>
>Especially because of the item in the global data created that's not under
>your control, I think the best answer at the moment is: Don't do that.
Sure! It's not a big problem for me, I just wanted to know what was going on.
Thanks John for your help once again!
/Kristian
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/