This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/70526] GCC 6 miscompiles Firefox JIT compiler
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Apr 2016 13:57:33 +0000
- Subject: [Bug rtl-optimization/70526] GCC 6 miscompiles Firefox JIT compiler
- Auto-submitted: auto-generated
- References: <bug-70526-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70526
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This changed with r223126.
The *.optimized dump is the same between r223124 and r223126, but already there
we can see that SRA used the TypedOrValueRegister type for the read:
MEM[(struct &)&D.2403] ={v} {CLOBBER};
_2 = TypedOrValueRegister::dataTyped (&D.2403);
MEM[(struct Register *)_2] = 10;
SR.8_7 = MEM[(struct TypedOrValueRegister *)&D.2403];
D.2403 ={v} {CLOBBER};
if (SR.8_7 != 10)
and then the scheduler swaps the store of 10 with the load from the memory.
I'd say this testcase is invalid, but with placement new it would not be
invalid, the question is if it would still misbehave then.