From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26490 invoked by alias); 8 Jul 2002 21:26:04 -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 26443 invoked by uid 71); 8 Jul 2002 21:26:01 -0000 Date: Mon, 08 Jul 2002 14:26:00 -0000 Message-ID: <20020708212601.26440.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Sven Lundblad Subject: Re: optimization/7232: Incorrect code generate for volatiles Reply-To: Sven Lundblad X-SW-Source: 2002-07/txt/msg00252.txt.bz2 List-Id: The following reply was made to PR optimization/7232; it has been noted by GNATS. From: Sven Lundblad To: Franz.Sirl-kernel@lauterbach.com Cc: gcc-gnats@gcc.gnu.org, karm@enea.se, steby@enea.se Subject: Re: optimization/7232: Incorrect code generate for volatiles Date: Mon, 8 Jul 2002 23:29:48 +0200 Hi, Thanks for the fast response! The generated code is still incorrect. Note the two lwz instructtions that loads from the same address (r11+8). Please see my comments below (and please correct me if I'm wrong). Regards, Sven Lundblad .file "test.c" .section ".text" .align 2 .type force_gcc_ppc_bug,@function force_gcc_ppc_bug: lis 11,ll@ha /* load address of ll into r11 high */ li 0,4660 la 11,ll@l(11) /* load address of ll into r11 low */ lwz 10,8(11) /* load ll.rtFreeList into r10, should be ll.rtFreeList->next (the lnk variable) ??? */ lwz 9,8(11) /* load ll.rtFreeList into r9 */ stw 0,0(10) /* store 0x1234 into ll.rtFreeList->dummy WRONG! */ mr 3,10 /* put ll.rtFreeList into r3 (but should be the lnk pointer) */ lwz 0,4(9) /* load ll.rtFreeList->next into r0 */ li 9,0 stw 0,8(11) /* store ll.rtFreeList->next into ll.rtFreeList */ li 0,18 stw 9,4(10) stb 0,42(10) /* store 0x12 into space outside allocated data! */ blr .Lfe1: .size force_gcc_ppc_bug,.Lfe1-force_gcc_ppc_bug .comm ll,12,4 .ident "GCC: (GNU) 3.1.1 20020704 (prerelease)"