Bug 186518 - asm w/ MMX operand constraint -> "please submit bug report"
asm w/ MMX operand constraint -> "please submit bug report"
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: gcc4 (Show other bugs)
5
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-23 19:20 EST by real name
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-24 10:17:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description real name 2006-03-23 19:20:24 EST
Description of problem:

"g++ -S foo.cpp" ->

ma2.cpp: In function ‘void madd(float4*)’:
ma2.cpp:8: internal compiler error: in emit_move_insn, at expr.c:3092
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccchT4xI.out file, please attach this to y\
our bugreport.


Version-Release number of selected component (if applicable):

]$ gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)

How reproducible:

100%

Steps to Reproduce:
1. gcc -S
2.
3.
  
Actual results:

as above

Expected results:

Might be operand constraint errors, etc., but would expect to either complain or
produce asm.


Additional info:

Preprocessed source:

// /usr/libexec/gcc/i386-redhat-linux/4.0.2/cc1plus -quiet -D_GNU_SOURCE ma2.cpp
-quiet -dumpbase ma2.cpp -auxbase ma2 -o - -frandom-seed=0
# 1 "ma2.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "ma2.cpp"
typedef struct float4 {
  float f[4];
} float4;

void madd (float4 *xp) {
  float4 x;
  asm ("movaps %1, %0" : "=x" (x) : "m" (*xp));
  asm ("mulps %0, %1" : "=x" (x) : "x" (x));
  asm ("addps %0, %1" : "=x" (x) : "x" (x));
  asm ("movaps %0, %1" : "=m" (*xp) : "x" (x));
}
Comment 1 Jakub Jelinek 2006-03-24 10:17:33 EST
This is really invalid in multiple ways.  It is true that GCC shouldn't
ICE even on as crappy input as this, but it is very low priority.
If you want to get it fixed, you can file it upstream
in http://gcc.gnu.org/bugzilla/ instead.
The testcase bugs are:
1) you can't use x constraint if -msse is not enabled, as there are no registers
   in the x class in that case
2) you can't use a structure there, it must be some scalar or vector type
   (say __m128)

Note You need to log in before you can comment on or make changes to this bug.