------- Comment #67 from olga at gcc dot gnu dot org 2008-02-07 10:26 ------- (In reply to comment #66)
> I looked wo_prof_global_var.c. The test passes with the above options. > The floating point convert operations look similar to those with > -fipa-struct-reorg. However, there's just one malloc call and the > values allocated for b are all zero. I see your point. Indeed, struct-reorg generates two additional mallocs, one additional for each structure field, so that original malloc is not used any more. (I hoped compiler optimizes it out, but it does not happen.) Your investigation implies that original malloc was initialized to zero, while mallocs generated by this optimization are not, that cause the failure. I looked into assembly you send and see the following difference: for original malloc there is additional instruction stwm %r4,64(%r30) before malloc call, while for first artificial malloc (field a, I suppose) there is similar instruction stw %r3,-60(%r30) but for the second artificial malloc there isn't. ("Copy" instructions are to carry results of the malloc). As I am not familiar with hp assembler, can you please explain what is the meaning of this instruction? Probably my suspicion is wrong. Olga -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34483