------- Comment #4 from olga at gcc dot gnu dot org 2007-12-30 11:52 ------- (In reply to comment #2) > Created an attachment (id=14802) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14802&action=view) [edit] > Dump files
I looked a bit at the dump files you generated for wo_prof_global_var.c test. It seems that in the first loop we convert (field 'b' + 1), that is float, to int and store this value into field 'a', i.e. D.1845_14 = D.1844_13->b; D.1846_15 = D.1845_14 + 1.0e+0; D.1847_16 = (int) D.1846_15; D.1844_13->a ={v} D.1847_16; while in the second we cast field 'a' to the float and compare it to the value of (field 'b' + 1), i.e. D.1849_24 = (float) D.1848_23; ... D.1845_29 = D.1844_28->b; D.1846_30 = D.1845_29 + 1.0e+0; if (D.1849_24 != D.1846_30) Is the last 'if' always should be true? I mean on any system... So I wonder whether this test works correctly even without -fipa-struct-reorg. Would you please try to compile it with all other options (-O3 -fdump-ipa-all -fwhole-program -combine -fipa-type-escape) and run it on your machine? It would be also interesting to check this test when the type of field 'b' is int instead of float. Thank you, Olga -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34534