From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20381 invoked by alias); 2 Apr 2003 20:16:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20330 invoked by uid 71); 2 Apr 2003 20:16:01 -0000 Date: Wed, 02 Apr 2003 20:16:00 -0000 Message-ID: <20030402201601.20329.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Janis Johnson Subject: Re: optimization/8878: miscompilation with -O and SSE Reply-To: Janis Johnson X-SW-Source: 2003-04/txt/msg00075.txt.bz2 List-Id: The following reply was made to PR optimization/8878; it has been noted by GNATS. From: Janis Johnson To: Volker Reichelt Cc: janis187@us.ibm.com, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, kronoz@tiscali.it Subject: Re: optimization/8878: miscompilation with -O and SSE Date: Wed, 2 Apr 2003 11:44:27 -0800 On Wed, Apr 02, 2003 at 09:17:49PM +0200, Volker Reichelt wrote: > Hi Janis, > > PR 8878 got fixed on mainline in the last couple of days (somewhere > between 2003-03-29 and 2003-04-02). > Since the bug is in the category "wrong-code" it would be nice > if the patch could be backported to 3.3 (and maybe even 3.2) to > prevent silent miscompilations. > > Could you please identify the patch that fixed the problem? > Maybe the following testcase is more convenient for the hunt, > since you can check the return value instead of the output: > > ------------------------snip here---------------------------- > typedef int v4sf __attribute__((mode(V4SF))); > > int main(void) > { > v4sf v = {1.0, 2.0, 3.0, 4.0}; > union { v4sf v; float f[4]; } u; > > u.v = __builtin_ia32_mulps(v,v); > > return u.f[0]; > } > ------------------------snip here---------------------------- > > Just compile with "gcc -march=i686 -msse -O". I don't know much about x86 architectures and what's supposed to work where, but on my Pentium III this gets "Illegal instruction" when run, using a mainline compiler from sources updated yesterday. Janis