From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25421 invoked by alias); 26 Sep 2002 03: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 25393 invoked by uid 71); 26 Sep 2002 03:16:01 -0000 Date: Wed, 25 Sep 2002 20:16:00 -0000 Message-ID: <20020926031601.25392.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Tim Prince Subject: Re: optimization/8049: SSE unaligned vector stores crash with -O0 Reply-To: Tim Prince X-SW-Source: 2002-09/txt/msg00699.txt.bz2 List-Id: The following reply was made to PR optimization/8049; it has been noted by GNATS. From: Tim Prince To: iano@cco.caltech.edu, gcc-gnats@gcc.gnu.org Cc: Subject: Re: optimization/8049: SSE unaligned vector stores crash with -O0 Date: Wed, 25 Sep 2002 20:13:05 -0700 On Wednesday 25 September 2002 15:58, iano@cco.caltech.edu wrote: > >Number: 8049 > >Category: optimization > >Synopsis: SSE unaligned vector stores crash with -O0 > >Confidential: no > >Severity: critical > >Priority: medium > >Responsible: unassigned > >State: open > >Class: sw-bug > >Submitter-Id: net > >Arrival-Date: Wed Sep 25 16:06:00 PDT 2002 > >Closed-Date: > >Last-Modified: > >Originator: Ian Ollmann > >Release: gcc 3.3 20020925 (experimental) > >Organization: > >Environment: > > Red Hat Linux 7.3 (P4/2530) > > >Description: > > I have encountered several cases at optimization level zero (-O0) wherein > the app seg faults on a movaps instruction just prior to calling > _mm_store_ps(). > > gcc -O0 -msse -g main.c > > main.c: > ------- > #include > #include > > void MatrixMultiply( float A[16], float B[16], float C[16] ); > > int main( void ) > { > float A[16] __attribute__ ((aligned (16) ) ); > float B[16] __attribute__ ((aligned (16) ) ); > float C[16] __attribute__ ((aligned (16) ) ); > int i; > I've seen several discussions indicating why gcc is unable to support these alignments in main(). In a search of gcc info, I don't find this point explained adequately. Ideally, the compiler would diagnose this as an error. Also, somewhere, the measures required to get alignments on Windows targets should be documented. -- Tim Prince