I had the same problem when developing Digital Universe with the latest SDK. Older SDKs worked but the latest one did not.
The answer I was given from the SDK experts is:
OK, we finally figured out what is happening and it is anAmigaOS-specific GCC compiler bug.
The root cause of the trouble is the pack(2) as you suspected all along. However, our GCC should have been created withthe -mstrict-align option to force strict alignments of floatingpoint types which makes the code run faster (alignment is good)at the expense of storage space.A bug has been filed against our version of GCC.
So add the -mstrict-align optionand your code should still compile and run without this problem. This enables the optimizer to do its job without worry.
So currently add the -mstrict-align in your makefiles when compiling for OS4, in a future SDK you should be able to leave this out as it will be on by default.