From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21368 invoked by alias); 20 May 2003 16:16:22 -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 20594 invoked by uid 71); 20 May 2003 16:16:01 -0000 Date: Tue, 20 May 2003 16:16:00 -0000 Message-ID: <20030520161601.20593.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: optimization/10877: [3.3/3.4 regression] miscompilation with -O3 -fPIC on x86 Reply-To: Wolfgang Bangerth X-SW-Source: 2003-05/txt/msg02184.txt.bz2 List-Id: The following reply was made to PR optimization/10877; it has been noted by GNATS. From: Wolfgang Bangerth To: Andrew Pinski Cc: gcc-bugs@gcc.gnu.org, , Subject: Re: optimization/10877: [3.3/3.4 regression] miscompilation with -O3 -fPIC on x86 Date: Tue, 20 May 2003 10:26:37 -0500 (CDT) > It does not fail for me though on i686-pc-linux-gnu with GCC: 3.4 > 20030517 (experimental). > Or on i686-unkown-openbsd3.1 with gcc version 3.4 20030519 > (experimental). OK, I made the experiment -- and my small snippet still segfaults with both 3.3 and 3.4 checked out an hour or so ago. This is the assembler output I get on my system with present 3.4. I think I'm at a loss for further explanations, but feel free to ask me if you think you have a theory... W. .file "y.cc" .globl i .bss .align 4 .type i, @object .size i, 4 i: .zero 4 .text .align 2 .p2align 4,,15 .globl _Z5get_xv .type _Z5get_xv, @function _Z5get_xv: .LFB4: call .LPR0 addl $_GLOBAL_OFFSET_TABLE_, %eax pushl %ebp .LCFI0: movl i@GOT(%eax), %edx movl %esp, %ebp .LCFI1: popl %ebp movl (%edx), %eax ret .LFE4: .size _Z5get_xv, .-_Z5get_xv .align 2 .p2align 4,,15 .globl main .type main, @function main: .LFB5: pushl %ebp .LCFI2: movl %esp, %ebp .LCFI3: leal -8(%ebp), %eax pushl %ebx .LCFI4: subl $4, %esp .LCFI5: andl $-16, %esp call .LPR3 addl $_GLOBAL_OFFSET_TABLE_, %ebx movl i@GOT(%ebx), %ecx movl %eax, (%ecx) call _Z5get_xv@PLT movl -4(%ebp), %ebx xorl %eax, %eax leave ret .LFE5: .size main, .-main .LPR0: movl (%esp), %eax ret .LPR3: movl (%esp), %ebx ret .ident "GCC: (GNU) 3.4 20030520 (experimental)"