From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4032 invoked by alias); 8 Jul 2002 13:06:03 -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 3938 invoked by uid 71); 8 Jul 2002 13:06:01 -0000 Date: Mon, 08 Jul 2002 06:06:00 -0000 Message-ID: <20020708130601.3928.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Franz Sirl Subject: Re: optimization/7232: Incorrect code generate for volatiles and -O2 Reply-To: Franz Sirl X-SW-Source: 2002-07/txt/msg00245.txt.bz2 List-Id: The following reply was made to PR optimization/7232; it has been noted by GNATS. From: Franz Sirl To: svlu@enea.se Cc: gcc-gnats@gcc.gnu.org,karm@enea.se,steby@enea.se Subject: Re: optimization/7232: Incorrect code generate for volatiles and -O2 Date: Mon, 08 Jul 2002 15:04:55 +0200 At 14:33 08.07.2002, svlu@enea.se wrote: > >Number: 7232 > >Category: optimization > >Synopsis: Incorrect code generate for volatiles and -O2 > >Confidential: no > >Severity: critical > >Priority: medium > >Responsible: unassigned > >State: open > >Class: sw-bug > >Submitter-Id: net > >Arrival-Date: Mon Jul 08 05:36:00 PDT 2002 > >Closed-Date: > >Last-Modified: > >Originator: Sven Lundblad / OSE Systems > >Release: gcc 3.1 > >Organization: > >Environment: >Solaris hosted cross compiler for powerpc and mips > >Description: >When the code below is compiled with gcc 3.1 and -O2, for at >least powerpc and mips, the second load instruction is >incorrect during the next pointer update (the same value is >reloaded instead of follow the pointer). It seams to be >related to the use of the volatile keyword. > >If compiled with just -O it works fine. > >This is a regression from gcc 2.95 which worked fine. > >How-To-Repeat: >Compile the gcc_bug1.c file with -S -O2 and examine the >output. This is what the current gcc-3_1-branch does to your code at -O2, is the bug still there? .file "test.c" .section ".text" .align 2 .type force_gcc_ppc_bug,@function force_gcc_ppc_bug: lis 11,ll@ha li 0,4660 la 11,ll@l(11) lwz 10,8(11) lwz 9,8(11) stw 0,0(10) mr 3,10 lwz 0,4(9) li 9,0 stw 0,8(11) li 0,18 stw 9,4(10) stb 0,42(10) blr .Lfe1: .size force_gcc_ppc_bug,.Lfe1-force_gcc_ppc_bug .comm ll,12,4 .ident "GCC: (GNU) 3.1.1 20020704 (prerelease)" Franz.