Bug 18353 - ICE with "movaps" in inline asm when using -masm=intel
Summary: ICE with "movaps" in inline asm when using -masm=intel
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
: 33918 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-07 06:41 UTC by Danny Smith
Modified: 2007-10-27 13:40 UTC (History)
2 users (show)

See Also:
Host:
Target: i386
Build:
Known to work: 4.3.0
Known to fail: 3.3.3 3.4.3 4.0.0 4.1.0 4.2.0
Last reconfirmed: 2007-08-24 12:43:28


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danny Smith 2004-11-07 06:41:59 UTC
Compiling following:

/* movaps.c */
struct v4f { float f[4];} __attribute__ ((aligned (16),packed));

void foo (void)
{
  struct v4f a = {{1.0f, 2.0f, 3.0f, 4.0f}};
  __asm__ __volatile__ ("movaps %0, %%xmm0"::"X"(a));
}

with gcc -c -msse2 -masm=intel movaps.c

gives:

> movaps.c: In function `void foo()':
> movaps.c:7: internal compiler error: in print_operand, at 
config/i386/i386.c:6564

The code compiles without error, using default asm syntax

Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --
host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --
enable-languages=c,c++,objc --disable-win32-registry --disable-shared --enable-
sjlj-exceptions --disable-libmudflap --disable-checking 
Thread model: win32
gcc version 4.0.0 20041101 (experimental)

3.3.3 and 3.4.3 releases also ICE with -masm=intel

Danny
Comment 1 Andrew Pinski 2004-11-07 07:09:55 UTC
I think this is invalid, the operand is wrong, you cannot pass a struct to an operand of an asm, see PR 
8788 for another example of where the problem can come into play.

Confirmed.
Comment 2 Francois-Xavier Coudert 2007-08-24 12:43:27 UTC
ICE still there, not mingw specific.
Comment 3 Rask Ingemann Lambertsen 2007-10-22 14:00:39 UTC
This works with revision 129548, which I think is the one that fixed it.
Comment 4 Rask Ingemann Lambertsen 2007-10-27 13:40:13 UTC
*** Bug 33918 has been marked as a duplicate of this bug. ***