This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25129] New: asm volatile optimizes to invalid operands
- From: "jw203198 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Nov 2005 23:57:10 -0000
- Subject: [Bug c/25129] New: asm volatile optimizes to invalid operands
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compile the following with -O and compile fails with "Error: suffix or operands
invalid for `movq'". No problem is either __volatile__ or -O removed.
Compiles ok with gcc-3.2.3 or gcc-2.96.
Here is the test code:
#define mmx_r2m(op,reg,mem) \
__asm__ __volatile__ (#op " %%" #reg ", %0" \
: "=X" (mem) \
: /* nothing */ )
#define movq_r2m(reg,var) mmx_r2m (movq, reg, var)
void gcc_fulla_bugs(void)
{
long long sumtop_accs;
movq_r2m( mm0, *(&sumtop_accs) );
}
--
Summary: asm volatile optimizes to invalid operands
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jw203198 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25129