[LLVMdev] Language lawyer question

Duncan Sands baldrick at free.fr
Wed Mar 12 01:11:01 PDT 2008


Hi,

> Looking through the gcc testsuite turned up an interesting edge case.   
> Let's assume our target leaves a hole for alignment in struct x, as do  
> x86 and powerpc.  Do you think the following code can validly abort?

I think you should ask this on the gcc mailing list.  For what it's
worth I'm sure that Ada does not require the values in padding to
be preserved.

> The current code seems to me to assume holes in structs can't ever be  
> validly accessed, which isn't right, as we see here.

Of course they can be accessed, but that doesn't in itself mean that
what they contain needs to be preserved by structure copies.

Ciao,

Duncan.



More information about the llvm-dev mailing list