This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/46598] [4.4/4.5/4.6 Regression] Miscompiles computed goto
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Nov 2010 14:38:27 +0000
- Subject: [Bug rtl-optimization/46598] [4.4/4.5/4.6 Regression] Miscompiles computed goto
- Auto-submitted: auto-generated
- References: <bug-46598-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46598
--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-23 14:38:00 UTC ---
(In reply to comment #9)
> Looks just like bogus inline asm. For rdtsc which sets 32-bits in %eax and
> 32-bits in %edx, for 32-bit code you want "=A" (long_long_variable) and
> for 64-bit code you need "=a" (one_int_variable), "=d" (another_int_variable)
> Otherwise you are lying on what the insn does.
> "=A" with an lvalue which is smaller or equal to word size means allocate it
> either in ax or in dx. Only with double word sized lvalue it means both ax and
> dx.
The split result for 64bit code is non-intuitive - I would have expected
that "=A" (int64_t variable) always works.
We should issue a warning here - I suspect the broken variants never make
sense.