This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/29808] New: [4.2 Regression] Error: suffix or operands invalid for `mov' when optimization is enabled
- From: "bero at arklinux dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Nov 2006 09:05:57 -0000
- Subject: [Bug inline-asm/29808] New: [4.2 Regression] Error: suffix or operands invalid for `mov' when optimization is enabled
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code (extracted from the Linux kernel) fails to compile with
optimization enabled:
static void load_fs(unsigned short sel)
{
asm("mov %0, %%fs" : : "g"(sel));
}
int main(int argc, char **argv)
{
load_fs(0);
}
[bero@dhcppc1 arklinux]$ gcc test.c
[bero@dhcppc1 arklinux]$ gcc -O1 test.c
/tmp/ccSpA5Rm.s: Assembler messages:
/tmp/ccSpA5Rm.s:13: Error: suffix or operands invalid for `mov'
gcc is 4.2 SVN revision 118519 (20061106).
--
Summary: [4.2 Regression] Error: suffix or operands invalid for
`mov' when optimization is enabled
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: inline-asm
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bero at arklinux dot org
GCC build triplet: i586-pc-linux-gnu
GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29808