public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Daniel Berlin <dberlin@dberlin.org>
To: Vincent Lefevre <vincent+gcc@vinc17.org>
Cc: gcc@gcc.gnu.org
Subject: Re: What is wrong with Bugzilla? [Was: Re: GCC and Floating-Point]
Date: Mon, 30 May 2005 15:40:00 -0000	[thread overview]
Message-ID: <1117427504.16811.34.camel@linux.site> (raw)
In-Reply-To: <20050528225238.GC5967@ay.vinc17.org>

On Sun, 2005-05-29 at 00:52 +0200, Vincent Lefevre wrote:
> On 2005-05-28 17:17:32 +0200, Uros Bizjak wrote:
> > At this point, I wonder what is wrong with Bugzilla, that those 
> > programmers don't fill a proper bug report. If there is a problem with 
> > GCC, that is so annoying to somebody, I think that at least developers 
> > could be informed about it via their standard channels of communication.
> 
> Perhaps because GCC developers think that GCC isn't buggy when the
> processor doesn't do the job for them? (I'm thinking of bug 323.)
> 

I don't believe people feel it's not buggy, it's just that nobody has
plans to fix this.  This is in line with the defaults of other
compilers, as well.

Let's take a duplicate of 323, 21809


Compiling the code there with icc gives us:

dberlin@linux:~> icc icca.c
icca.c(7): warning #1572: floating-point equality and inequality
comparisons are unreliable
    assert(a == x);
    ^

./dberlin@linux:~> ./a.out
a.out: icca.c:7: main: Assertion `a == x' failed.
Aborted

In order to get icc to not generate an executable that will abort, you
have to pass special flags (the same way we have -ffloat-store, except I
believe their -mp flag will just disable any optimization that could get
in the way of this working).

One of these flag options is to tell it to use processor specific
instructions, which auto turns on the equivalent of -mfpmath=sse.

Maybe if the compiler from the people who made the processor didn't do
what we did, we'd be more concerned.  Maybe not.  But it certainly
doesn't slant in favor of the vocal (what appears to be) minority to
change the way we default, etc, when everyone else seems to have come to
the same decision independently.

--Dan

PS i found this humorous for some reason:

      call      __intel_proc_init                             #4.1
        flds      _2il0floatpacket.1                            #5.17
        fdivs     x                                             #5.17
        fsts      x                                             #6.3
        fcomps    x                                             #7.3
        fnstsw    %ax                                           #7.3
        sahf                                                    #7.3
        jne       ..B1.3        # Prob 42%                      #7.3
                                # LOE ebx esi edi
..B1.2:                         # Preds ..B1.1
        xorl      %eax, %eax                                    #8.1
        movl      %ebp, %esp                                    #8.1
        popl      %ebp                                          #8.1
        ret                                                     #8.1
                                # LOE
..B1.3:                         # Preds ..B1.1
        push      $__STRING.2                                   #7.3
        push      $7                                            #7.3
        push      $__STRING.1                                   #7.3
        push      $__STRING.0                                   #7.3
        call      __assert_fail                                 #7.3
                                # LOE
..B1.6:                         # Preds ..B1.3


Apparently they estimate the probability of a == x succeeding at 42% for
some reason (This is true at all opts levels, with and without SSE
math). Why this isn't 50%, who knows.


  parent reply	other threads:[~2005-05-30 15:35 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-28 17:10 Uros Bizjak
2005-05-28 23:02 ` Scott Robert Ladd
2005-05-28 23:28   ` Daniel Berlin
2005-05-28 23:29   ` William Beebe
2005-05-29  4:47     ` Scott Robert Ladd
2005-05-29 18:32   ` Kai Henningsen
2005-05-29 18:52     ` William Beebe
2005-05-29 19:24       ` What is wrong with Bugzilla? Russ Allbery
2005-05-30 16:32         ` William Beebe
2005-05-30 19:22           ` Russ Allbery
2005-05-30 15:35       ` What is wrong with Bugzilla? [Was: Re: GCC and Floating-Point] Kai Henningsen
2005-05-31  3:50         ` chris jefferson
2005-05-31  5:56           ` Gary Funck
2005-05-31  6:04           ` Paul Brook
2005-05-30 15:39       ` Daniel Berlin
2005-05-29  1:30 ` Vincent Lefevre
2005-05-29 15:57   ` Giovanni Bajo
2005-05-29 18:05     ` Michael Veksler
2005-05-30 15:34       ` Vincent Lefevre
2005-05-30 15:48       ` Daniel Berlin
2005-05-30 15:31         ` Vincent Lefevre
     [not found]       ` <26669933.1117479096256.JavaMail.root@dtm1eusosrv72.dtm.ops.eu.uu.net>
2005-05-30 21:17         ` Toon Moene
2005-05-31 11:24           ` Robert Dewar
2005-06-06 21:47             ` Laurent GUERBY
2005-06-06 23:23               ` Robert Dewar
2005-06-09  7:44                 ` Vincent Lefevre
2005-05-31 12:51           ` Vincent Lefevre
2005-05-31 13:17             ` Andreas Schwab
2005-05-31 13:44               ` Vincent Lefevre
2005-05-31 14:32                 ` Andreas Schwab
2005-05-31 15:10                   ` Vincent Lefevre
2005-05-31 15:58                     ` Andreas Schwab
2005-05-31 16:53                       ` Scott Robert Ladd
2005-05-31 17:03                         ` Andreas Schwab
2005-05-31 18:40                           ` Vincent Lefevre
2005-05-31 19:28                             ` Jakub Jelinek
2005-05-31 23:30                               ` Vincent Lefevre
2005-05-31 18:35                         ` Vincent Lefevre
2005-05-31 17:44                       ` Vincent Lefevre
2005-05-31 20:11                         ` Andreas Schwab
2005-05-31 23:53                           ` Vincent Lefevre
     [not found]                             ` <jefyw3jguf.fsf@sykes.suse.de>
     [not found]                               ` <20050531224258.GJ3541@ay.vinc17.org>
     [not found]                                 ` <jemzqb2eb2.fsf@sykes.suse.de>
2005-06-01  0:23                                   ` Vincent Lefevre
2005-06-01  8:42                                     ` Andreas Schwab
2005-05-31 17:21                     ` Mike Stump
2005-05-31 17:44                       ` Dave Korn
2005-06-01  1:57                         ` Marcin Dalecki
2005-05-31 19:27                       ` Vincent Lefevre
2005-05-31 19:58                         ` Mike Stump
2005-05-31 23:40                           ` Vincent Lefevre
2005-06-01  5:59                             ` Alan Modra
2005-06-01  7:21                               ` Vincent Lefevre
2005-06-01 17:32                                 ` Mike Stump
2005-06-01 18:01                                   ` Daniel Berlin
2005-06-01 18:33                                     ` Mike Stump
2005-05-29 20:13     ` Joseph S. Myers
2005-05-29 20:18       ` Haren Visavadia
2005-05-30 15:40   ` Daniel Berlin [this message]
2005-05-30 15:31     ` Vincent Lefevre
2005-05-30 20:12     ` Haren Visavadia
2005-05-30 20:13       ` Robert Dewar
2005-05-30 20:34         ` Haren Visavadia
2005-05-30 20:46           ` Robert Dewar
2005-05-30 21:10             ` Haren Visavadia
2005-05-31  9:11               ` Robert Dewar
2005-05-31 12:33             ` Vincent Lefevre
2005-05-31 12:48               ` Andrew Haley
2005-05-31 13:35                 ` Vincent Lefevre
2005-05-31 14:08                 ` Vincent Lefevre
2005-06-22 19:44     ` What is wrong with Bugzilla? Gerald Pfeifer
2005-05-29  7:33 ` What is wrong with Bugzilla? [Was: Re: GCC and Floating-Point] Ross Smith
2005-05-29  7:51   ` Joe Buck
2005-05-29  9:56     ` R Hill
2005-05-30 17:03       ` What is wrong with Bugzilla? Zack Weinberg
2005-05-30 19:39         ` Gary Funck
2005-05-30 15:48   ` What is wrong with Bugzilla? [Was: Re: GCC and Floating-Point] Daniel Berlin
2005-05-31  7:40     ` R Hill
2005-05-31 12:04       ` What is wrong with Bugzilla? Russ Allbery
2005-05-31 12:08         ` R Hill
2005-05-31 17:14         ` Dave Korn
2005-05-31 17:14           ` Daniel Berlin
2005-05-31 17:43             ` Dave Korn
2005-05-31 19:18               ` Daniel Berlin
2005-05-31 19:43                 ` Dave Korn
2005-05-31 17:22   ` What is wrong with Bugzilla? [Was: Re: GCC and Floating-Point] Hugh Sasse
2005-05-29 12:54 ` Haren Visavadia
2005-05-29 15:19   ` Michael Veksler
2005-05-29 15:38     ` Giovanni Bajo
2005-05-29 18:16       ` Michael Veksler
2005-05-30 16:07       ` Daniel Berlin
2005-05-30 15:36         ` Michael Veksler
2005-05-30 15:28           ` Daniel Berlin
2005-05-30 15:28           ` Daniel Berlin
2005-05-29 17:23     ` Haren Visavadia
2005-05-30 15:25     ` Joe Buck
2005-05-30 15:31     ` Vincent Lefevre
2005-05-30 15:43     ` Daniel Berlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1117427504.16811.34.camel@linux.site \
    --to=dberlin@dberlin.org \
    --cc=gcc@gcc.gnu.org \
    --cc=vincent+gcc@vinc17.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).