support/regression/tests/bug-3184920.c fails for hc08. To reproduce remove the #if !defined(SDCC_hc08) in that file.
It's a bug in the hc08 port only to the extent that some feel that big endian architectures are a bug. For this reason it also fails the host target on sparc64-unknown-netbsd and sparc-sun-solaris systems in our distributed compiler farm. If this test was addressing a problem in the z80 code generator, perhaps #if defined(SDCC_z80) would be better. Otherwise I think we need an endian.h and use it to make this test endian agnostic.
Endianness can be solved by accepting either order in the check. Though I'm not sure if that may accidentally pass for the original bug.
But it will also fail when structs are not packed to byte boundaries which is likely on any non-8-bit architecture. That it passes for gcc on x86 seems pure luck.
Fixed in revision #6238.
Log in to post a comment.