------- Comment #5 from pinskia at gcc dot gnu dot org 2006-11-07 19:34 -------
apinski hi apinski PaulT: VCE means *(type*)&a without the need for addressable and does not confuse aliasing PaulT apinski: Hi, yes I answered the question myself - I missed it in tree.def by only looking in tree.h apinski PaulT: this is mention in tree.def :) PaulT apinski: It's undefined if the types have different lengths? apinski yes apinski actually is transfer ok for different size types? PaulT Yes, I was just racing for the standard. apinski ok apinski I guess I have to change my patch then apinski to include a size comparision apinski The physical representation of the result is the same as SOURCE, truncated if the result is smaller or with an undefined trailing portion if the result is larger. apinski that is from IBM's docs about transfer PaulT apinski: Gee, yes. I missed that completely. apinski I can improve the truncated part also PaulT If I change the integers in your example to integer(8), I get a core dump. apinski during running? PaulT g95 and ifort do the right thing. PaulT Shucks, I'm sorry about that Andrew, I missed it completely. apinski I figured it was going to be wrong apinski lucky I only applied to the mainline :) apinski can you write something in the bug report so I don't forget to fix it this weekend? PaulT apinski: I keep telling people that that is what it is for! PaulT apinski: Sure thing - I suppose that you can safely do a kind conversion? apinski I know how to fix this correctly now apinski use __builtin_memcpy and hope that gets optimized correctly in the future :) PaulT apinski: make type of the same length as source, so that the assignment does the rest? apinski no apinski PaulT: do memcpy (dst, src, min(size1, size0)) PaulT apinski: No... you're right that won't present a bit-wise transfer. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29410