This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

target/4899: error in val=sin(arg) on arm-plattform

[Get raw message]

>Number:         4899
>Category:       target
>Synopsis:       error in val=sin(arg) on arm-plattform
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 19 05:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Kuchler
>Release:        gcc version 2.95.2 19991030 (2.95.3 prerelease/franzo)
>Organization:
>Environment:
# GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
# Built for i686-pc-linux-gnu
# Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
# 	Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

# Report bugs to <bug-make@gnu.org>.


# Make data base, printed on Mon Nov 19 13:06:02 2001

# Variables

# environment
WINDOWMANAGER = /usr/X11R6/bin/kde
# environment
OLDPWD = /mnt/ext1/home/ka
# environment
http_proxy = 212.222.53.84:3128
# environment
TEXINPUTS = :~/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX
# environment
HOME = /home/ka
# environment
LESSOPEN = |lesspipe.sh %s
# environment
PRINTER = lp
# environment
MAIL = /var/mail/ka
# environment
PWD = /mnt/ext1/home/ka/Projekte/Dafit/FFT/testsinus
# environment
DEVELOP = /sa1110-develop
# environment
PS1 = \u@\h:\w > 
# environment
NNTPSERVER = news
# environment
INFOPATH = /usr/local/info:/usr/share/info:/usr/info
# environment
_ = /usr/bin/make
# environment
no_proxy = localhost
# environment
SSH_TTY = /dev/pts/9
# environment
MINICOM = -c on
# environment
OPENWINHOME = /usr/openwin
# environment
MACHTYPE = i386-suse-linux
# environment
USER = ka
# environment
LESSCHARSET = latin1
# environment
SHELL = /bin/bash
# environment
MANPATH = /usr/local/man:/usr/share/man:/usr/man:/usr/X11R6/man:/usr/openwin/man:/usr/share/man/allman:/usr/lib/qt3/doc/man
# environment
QMAKESPEC = qws/linux-arm-g++
# environment
HOSTTYPE = i386
# environment
INFODIR = /usr/local/info:/usr/share/info:/usr/info
# environment
PS2 = > 
# environment
LS_OPTIONS = -N --color=tty -T 0
# environment
GNOMEDIR = /opt/gnome
# environment
QTDIR = /sa1110-develop/qt3
# environment
KDEDIR = /opt/kde
# environment
gopher_proxy = 212.222.53.84:3128
# environment
ignoreeof = 0
# environment
HOSTNAME = CMDevLin1
# environment
TERM = vt320
# environment
LOGNAME = ka
# environment
SHLVL = 1
# environment
LD_LIBRARY_PATH = /sa1110-develop/qt3/lib
# environment
LESS = -M -S -I
# environment
LANG = de_DE
# environment
ECOS_REPOSITORY = /opt/ecos/packages
# environment
POVRAYOPT = -l/usr/lib/povray/include
# environment
XNLSPATH = /usr/X11R6/lib/X11/nls
# environment
OSTYPE = linux
# environment
LESSKEY = /etc/lesskey.bin
# environment
SUSE_DOC_HOST = localhost
# environment
FROM_HEADER = pc-remotetest.cm_development
# environment
COLORTERM = 1
# environment
XKEYSYMDB = /usr/X11R6/lib/X11/XKeysymDB
# environment
LC_COLLATE = POSIX
# environment
ftp_proxy = 212.222.53.84:3128
# environment
SNIFF_DIR = /opt/sniff-3.2
# environment
PAGER = less
# environment
PATH = /opt/ecos/tools/H-i686-pc-linux-gnu/bin:/opt/ecos/tools/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/lib/java/bin:/usr/games/bin:/usr/games:/opt/gnome/bin:/opt/kde2/bin:/opt/kde/bin:/usr/openwin/bin:.:/usr/lib/qt3/bin:/usr/local/tmake/bin:/opt/sniff-3.2/bin:/opt/hardhat/devkit/arm/sa110_le/bin:/opt/hardhat/host/bin
# environment
LS_COLORS = 
# environment
TMAKEPATH = /usr/local/tmake/lib/linux-g++
# environment
HISTCONTROL = ignoredups
# 57 variables in 523 hash buckets.
# average of 0,1 variables per bucket, max 2 in one bucket.

# Directories


# No files, no impossibilities in 0 directories.

# Implicit Rules

# No implicit rules.

# Pattern-specific variable values

# No pattern-specific variable values.

# Files

# No files.

# VPATH Search Paths

# No `vpath' search paths.

# No general (`VPATH' variable) search path.

# Finished Make data base on Mon Nov 19 13:06:02 2001
>Description:
Value of val=sin(arg) is jumping from 0.78.. to -0.77.. at arg=Pi/4 when running on arm-processor after crosscompiling from i386 to arm. The jump is repeating every Pi/2. The error does not happen with the same code on i386.

The error is the same with C(math.h) and C++(cmath).
>How-To-Repeat:
compile attached file with arm-linux-gcc and run it with gdb. watch "sinus" at "nLoop=51" to "nLoop=52"
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="main.cpp"
Content-Disposition: inline; filename="main.cpp"

/***************************************************************************
                          main.cpp  -  description
                             -------------------
    begin                : Mon Nov 19 2001
    copyright            : (C) 2001 by 
    email                : 
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <cmath>
#include <iostream>

const float Pi=3.14f;
const int nSamples=4096;
const float Freq=10.0f;

int main(void)
{
    double sinus[nSamples];
    int nLoop=0;

    for (nLoop=0; nLoop<nSamples; nLoop++)
    {
        sinus[nLoop]=sin(2.0f*Pi*Freq/nSamples*nLoop);
    }
    cout << sinus[51] << endl;
    cout << sinus[52] << endl;
    return(0);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]