Bug 23575 - [4.0/4.1 Regression] ICE: output_operand: unterminated assembly dialect alternative
Summary: [4.0/4.1 Regression] ICE: output_operand: unterminated assembly dialect alter...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.2
: P2 normal
Target Milestone: 4.0.2
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: ice-on-valid-code, patch, ssemmx
Depends on:
Blocks:
 
Reported: 2005-08-26 11:31 UTC by Florian Schanda
Modified: 2005-08-27 12:35 UTC (History)
1 user (show)

See Also:
Host:
Target: i686-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-08-26 13:27:15


Attachments
Original reduced source file (690 bytes, text/plain)
2005-08-26 11:32 UTC, Florian Schanda
Details
Preprocessed source file (11.45 KB, text/plain)
2005-08-26 11:33 UTC, Florian Schanda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Schanda 2005-08-26 11:31:27 UTC
gcc version: 4.0.2 20050825 (prerelease) 
 
Configured with: ../gcc-4.0-20050825/configure --prefix=/opt/gcc4 
--enable-shared --enable-threads=posix --enable-__cxa_atexit 
--enable-clocale=gnu --enable-languages=c,c++ 
 
Command line: 
gcc -c -march=pentium4 -O3 test.ii 
 
(removing the -O3 flag makes it work) 
 
Error message: 
test.cpp: In constructor ‘ShadowVolume::ShadowVolume(Mesh&)’: 
test.cpp:75: internal compiler error: output_operand: unterminated assembly 
dialect alternative 
 
I have attempted to reduce the file as much as possible. I will also attach 
the proprocessed source.
Comment 1 Florian Schanda 2005-08-26 11:32:46 UTC
Created attachment 9589 [details]
Original reduced source file
Comment 2 Florian Schanda 2005-08-26 11:33:39 UTC
Created attachment 9590 [details]
Preprocessed source file
Comment 3 Andrew Pinski 2005-08-26 12:07:47 UTC
Reducing.
Comment 4 Andrew Pinski 2005-08-26 13:27:13 UTC
Confirmed, reduced testcase:
typedef double __v2df __attribute__ ((__vector_size__ (16)));
typedef __v2df __m128d;
static __inline __m128d __attribute__((__always_inline__)) _mm_set1_pd (double __F) {
  return __extension__ (__m128d){__F, __F};
}
static __inline __m128d __attribute__((__always_inline__)) _mm_move_sd (__m128d __A, __m128d __B) {
  return (__m128d) __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B);
}
void g(__m128d b);
__m128d cross(__m128d tmp9)
{
  __m128d t1 = _mm_set1_pd(1.0);
  __m128d tmp10 = _mm_move_sd(t1, tmp9);
  return tmp10;
}
Comment 5 Andrew Pinski 2005-08-26 13:30:47 UTC
It is obvious what is wrong from the .md file:
(define_insn "sse2_movsd"
  [(set (match_operand:V2DF 0 "nonimmediate_operand"   "=x,x,m,x,x,o")
        (vec_merge:V2DF
          (match_operand:V2DF 2 "nonimmediate_operand" " x,m,x,0,0,0")
          (match_operand:V2DF 1 "nonimmediate_operand" " 0,0,0,x,o,x")
          (const_int 1)))]
  "TARGET_SSE2"
  "@
   movsd\t{%2, %0|%0, %2}
   movlpd\t{%2, %0|%0, %2}
   movlpd\t{%2, %0|%0, %2}
   shufpd\t{$2, %2, %0|%0, %2, 2}
   movhps\t{%H1, %0|%0, %H1
   movhps\t{%1, %H0|%H0, %1"
  [(set_attr "type" "ssemov,ssemov,ssemov,sselog,ssemov,ssemov")
   (set_attr "mode" "DF,V1DF,V1DF,V2DF,V1DF,V1DF")])
Comment 6 Richard Biener 2005-08-26 16:23:29 UTC
Patch.
Comment 7 CVS Commits 2005-08-27 12:04:36 UTC
Subject: Bug 23575

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rguenth@gcc.gnu.org	2005-08-27 12:04:28

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: sse.md 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.target/i386: pr23575.c 

Log message:
	2005-08-27  Richard Guenther  <rguenther@gcc.gnu.org>
	
	PR target/23575
	* config/i386/sse.md (sse2_movsd): Add missing closing
	braces.
	
	* gcc.target/i386/pr23575.c: New testcase.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9837&r2=2.9838
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/sse.md.diff?cvsroot=gcc&r1=1.22&r2=1.23
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5969&r2=1.5970
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.target/i386/pr23575.c.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 8 Richard Biener 2005-08-27 12:35:03 UTC
Fixed on both head and 4.0.