From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2001 invoked by alias); 19 May 2003 10:17:14 -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 32475 invoked by uid 71); 19 May 2003 10:16:01 -0000 Date: Mon, 19 May 2003 10:17:00 -0000 Message-ID: <20030519101601.32474.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Christian Szegedy Subject: Re: c/10844: Wrong computation on nan initialized vectors. Reply-To: Christian Szegedy X-SW-Source: 2003-05/txt/msg02064.txt.bz2 List-Id: The following reply was made to PR c/10844; it has been noted by GNATS. From: Christian Szegedy To: ehrhardt@mathematik.uni-ulm.de, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, szegedy@or.uni-bonn.de Subject: Re: c/10844: Wrong computation on nan initialized vectors. Date: Mon, 19 May 2003 12:05:19 +0200 ehrhardt@mathematik.uni-ulm.de wrote: >Synopsis: Wrong computation on nan initialized vectors. > >State-Changed-From-To: open->feedback >State-Changed-By: cae >State-Changed-When: Sun May 18 17:49:33 2003 >State-Changed-Why: > I can't reproduce this. Could you tell us the compiler options used > to compile the code, the output of gcc -v and the assemble code > generated for the main function? Additionally your libc version might > be of interest here. > > regards Christian > > >http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10844 > > > I just used "gcc -lm bug.c" to compile the code. I am at work, but I can reproduce the bug on my SuSe 8.0 box, with Reading specs from /home/szegedy/extern/gcc-3.2-install/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs Configured with: ../gcc-3.2/configure --prefix=/home/szegedy/extern/gcc-3.2-install Thread model: posix gcc version 3.2 How can I determine the glibc version? The bug also occurs with the old 2.95 compiler. The assembler output is: .file "bug.c" .section .rodata .LC0: .string "" .LC2: .string "%lg\n" .text .align 2 .globl main .type main,@function main: pushl %ebp movl %esp, %ebp pushl %esi pushl %ebx subl $32, %esp andl $-16, %esp movl $0, %eax subl %eax, %esp movl $10, -16(%ebp) movl -16(%ebp), %eax sall $3, %eax movl %eax, (%esp) call malloc movl %eax, -20(%ebp) movl $0, -12(%ebp) .L2: movl -12(%ebp), %eax cmpl -16(%ebp), %eax jl .L5 jmp .L3 .L5: movl -12(%ebp), %eax leal 0(,%eax,8), %esi movl -20(%ebp), %ebx movl $.LC0, (%esp) call nan pushl %eax fildl (%esp) leal 4(%esp), %esp fstpl (%ebx,%esi) leal -12(%ebp), %eax incl (%eax) jmp .L2 .L3: movl -20(%ebp), %eax movl $0, (%eax) movl $0, 4(%eax) movl -20(%ebp), %edx movl -20(%ebp), %eax fldl (%eax) fldz faddp %st, %st(1) fstpl (%edx) movl $.LC2, (%esp) movl -20(%ebp), %eax movl 4(%eax), %edx movl (%eax), %eax movl %eax, 4(%esp) movl %edx, 8(%esp) call printf movl $0, %eax leal -8(%ebp), %esp popl %ebx popl %esi popl %ebp ret .Lfe1: .size main,.Lfe1-main .ident "GCC: (GNU) 3.2"