[Bug c/56143] Incorrect code generation with -O0 in x86_64

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 30 02:12:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56143

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-01-30 02:11:46 UTC ---
(In reply to comment #1)
> *_jit->pc.ui++ = i0 - (_jit->pc.w + 4);
> 
> You have a sequence point issue.  This is like doing:
> *i++ = i0 - (i + 4);

The reason why it is the same is because pc is an union:
    union {
 jit_uint8_t *uc;
 jit_uint16_t *us;
 jit_uint32_t *ui;
 jit_uint64_t *ul;
 jit_word_t w;
    } pc;

So any access/set to ui also accesses/sets w.



More information about the Gcc-bugs mailing list