https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42586
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.6.0 Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #21 from Andrew Pinski <pinskia at gcc dot gnu.org> --- GCC 4.6.0 was when the fix was included for this. Cyc_string_ungetc: .LFB0: .cfi_startproc movl 8(%esp), %eax subl $1, (%eax) xorl %eax, %eax ret Note the trunk's sra does not need to handle the extra copy any more. Before esra: ``` _T2 = *sptr_3(D); // unused _ans = *sptr_3(D); _1 = _ans.curr; _2 = _1 + 4294967295; _ans.curr = _2; *sptr_3(D) = _ans; _T2 ={v} {CLOBBER(eos)}; _ans ={v} {CLOBBER(eos)}; ``` ESRA does now: ``` _T2 = *sptr_3(D); _ans$curr_13 = sptr_3(D)->curr; _ans$base_10 = MEM <unsigned char *> [(struct _fat_ptr *)sptr_3(D) + 4B]; _ans$last_plus_one_8 = MEM <unsigned char *> [(struct _fat_ptr *)sptr_3(D) + 8B]; _1 = _ans$curr_13; _2 = _1 + 4294967295; _ans$curr_5 = _2; sptr_3(D)->curr = _ans$curr_5; MEM <unsigned char *> [(struct _fat_ptr *)sptr_3(D) + 4B] = _ans$base_10; MEM <unsigned char *> [(struct _fat_ptr *)sptr_3(D) + 8B] = _ans$last_plus_one_8; _T2 ={v} {CLOBBER(eos)}; ``` In GCC 15 it was: ``` _T2$curr_13 = MEM <unsigned char *> [(struct _fat_ptr *)sptr_3(D)]; _T2$base_10 = MEM <unsigned char *> [(struct _fat_ptr *)sptr_3(D) + 4B]; _T2$last_plus_one_8 = MEM <unsigned char *> [(struct _fat_ptr *)sptr_3(D) + 8B]; _ans$curr_5 = _T2$curr_13; _ans$base_4 = _T2$base_10; _ans$last_plus_one_16 = _T2$last_plus_one_8; _1 = _ans$curr_5; _2 = _1 + 4294967295; _ans$curr_17 = _2; sptr_3(D)->curr = _ans$curr_17; MEM <unsigned char *> [(struct _fat_ptr *)sptr_3(D) + 4B] = _ans$base_4; MEM <unsigned char *> [(struct _fat_ptr *)sptr_3(D) + 8B] = _ans$last_plus_one_16; return 0; ```