public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/31175] New: isinf incorrectly expanded @ 2007-03-14 16:47 rth at gcc dot gnu dot org 2007-03-14 17:19 ` [Bug target/31175] " schwab at suse dot de ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: rth at gcc dot gnu dot org @ 2007-03-14 16:47 UTC (permalink / raw) To: gcc-bugs #include <math.h> double x = -__builtin_inf (); int main() { if (isinf (x) != -1) abort (); return 0; } Examine the definition of isinf closely. It returns -1 for -inf. -- Summary: isinf incorrectly expanded Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rth at gcc dot gnu dot org GCC target triplet: i386-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31175 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/31175] isinf incorrectly expanded 2007-03-14 16:47 [Bug target/31175] New: isinf incorrectly expanded rth at gcc dot gnu dot org @ 2007-03-14 17:19 ` schwab at suse dot de 2007-03-14 17:38 ` ubizjak at gmail dot com ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: schwab at suse dot de @ 2007-03-14 17:19 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from schwab at suse dot de 2007-03-14 17:19 ------- The standard has no such requirement. It only talks about non-zero value. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31175 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/31175] isinf incorrectly expanded 2007-03-14 16:47 [Bug target/31175] New: isinf incorrectly expanded rth at gcc dot gnu dot org 2007-03-14 17:19 ` [Bug target/31175] " schwab at suse dot de @ 2007-03-14 17:38 ` ubizjak at gmail dot com 2007-04-03 10:21 ` uros at gcc dot gnu dot org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: ubizjak at gmail dot com @ 2007-03-14 17:38 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from ubizjak at gmail dot com 2007-03-14 17:38 ------- (In reply to comment #0) > Examine the definition of isinf closely. It returns -1 for -inf. But: NOTE Note that these functions are obsolete. C99 defines macros isfinite(), isinf() and isnan() (for all types) replacing them. Further note that the C99 isinf() has weaker guarantees on the return value. However, it is possible to add &&TARGET_C99_FUNCTIONS to isinf<mode>2 expander to expand only when we know that target has functions that conform to c99 standard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31175 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/31175] isinf incorrectly expanded 2007-03-14 16:47 [Bug target/31175] New: isinf incorrectly expanded rth at gcc dot gnu dot org 2007-03-14 17:19 ` [Bug target/31175] " schwab at suse dot de 2007-03-14 17:38 ` ubizjak at gmail dot com @ 2007-04-03 10:21 ` uros at gcc dot gnu dot org 2007-04-05 11:22 ` ubizjak at gmail dot com 2008-11-05 16:21 ` ubizjak at gmail dot com 4 siblings, 0 replies; 6+ messages in thread From: uros at gcc dot gnu dot org @ 2007-04-03 10:21 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from uros at gcc dot gnu dot org 2007-04-03 11:21 ------- Subject: Bug 31175 Author: uros Date: Tue Apr 3 11:20:53 2007 New Revision: 123465 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123465 Log: PR target/31175 * config/i386/i386.md (isinf<mode>2): Expand only when TARGET_C99_FUNCTIONS is set. Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.md -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31175 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/31175] isinf incorrectly expanded 2007-03-14 16:47 [Bug target/31175] New: isinf incorrectly expanded rth at gcc dot gnu dot org ` (2 preceding siblings ...) 2007-04-03 10:21 ` uros at gcc dot gnu dot org @ 2007-04-05 11:22 ` ubizjak at gmail dot com 2008-11-05 16:21 ` ubizjak at gmail dot com 4 siblings, 0 replies; 6+ messages in thread From: ubizjak at gmail dot com @ 2007-04-05 11:22 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from ubizjak at gmail dot com 2007-04-05 12:21 ------- Fixed. -- ubizjak at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31175 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/31175] isinf incorrectly expanded 2007-03-14 16:47 [Bug target/31175] New: isinf incorrectly expanded rth at gcc dot gnu dot org ` (3 preceding siblings ...) 2007-04-05 11:22 ` ubizjak at gmail dot com @ 2008-11-05 16:21 ` ubizjak at gmail dot com 4 siblings, 0 replies; 6+ messages in thread From: ubizjak at gmail dot com @ 2008-11-05 16:21 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from ubizjak at gmail dot com 2008-11-05 16:20 ------- *** Bug 38023 has been marked as a duplicate of this bug. *** -- ubizjak at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |grxnprzn at gmx dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31175 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-11-05 16:21 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-03-14 16:47 [Bug target/31175] New: isinf incorrectly expanded rth at gcc dot gnu dot org 2007-03-14 17:19 ` [Bug target/31175] " schwab at suse dot de 2007-03-14 17:38 ` ubizjak at gmail dot com 2007-04-03 10:21 ` uros at gcc dot gnu dot org 2007-04-05 11:22 ` ubizjak at gmail dot com 2008-11-05 16:21 ` ubizjak at gmail dot com
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).