------- Comment #1 from rguenth at gcc dot gnu dot org 2006-09-29 14:15 ------- The root of the problem is "wrong" alias information:
<bb 2>: # SMT.6_27 = V_MAY_DEF <SMT.6_25>; # SMT.7_28 = V_MAY_DEF <SMT.7_26>; D.2530_3 = operator new (8); f_4 = (struct Foo *) D.2530_3; # SMT.6_29 = V_MAY_DEF <SMT.6_27>; f_4->i = 1; i_5 = 0; goto <bb 4> (<L1>); <L0>:; D.2542_7 = 8; __p_8 = f_1; D.2544_9 = __p_8; D.2544_10 = D.2544_9; D.2535_11 = D.2544_10; b_12 = (struct Bar *) D.2535_11; # SMT.7_30 = V_MAY_DEF <SMT.7_24>; b_12->p = 0B; D.2545_13 = 8; __p_14 = f_1; D.2547_15 = __p_14; D.2547_16 = D.2547_15; D.2536_17 = D.2547_16; f_18 = (struct Foo *) D.2536_17; D.2537_19 = (long int) i_2; # SMT.6_31 = V_MAY_DEF <SMT.6_23>; f_18->i = D.2537_19; i_20 = i_2 + 1; # SMT.7_24 = PHI <SMT.7_28(2), SMT.7_30(3)>; # SMT.6_23 = PHI <SMT.6_29(2), SMT.6_31(3)>; # i_2 = PHI <i_5(2), i_20(3)>; # f_1 = PHI <f_4(2), f_18(3)>; <L1>:; if (i_2 < n_6) goto <L0>; else goto <L2>; <L2>:; # VUSE <SMT.6_23>; D.2538_21 = f_1->i; return D.2538_21; the stores to b_12->p and f_18->i appear to be independent. But there is an implicit barrier between them from the std::new. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286