public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: sebor@roguewave.com
To: gcc-gnats@gcc.gnu.org
Subject: c++/8228: ICE on HUGE_VAL in template code
Date: Mon, 14 Oct 2002 19:06:00 -0000	[thread overview]
Message-ID: <20021015015739.3351.qmail@sources.redhat.com> (raw)


>Number:         8228
>Category:       c++
>Synopsis:       ICE on HUGE_VAL in template code
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 14 19:06:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     sebor@roguewave.com
>Release:        3.2
>Organization:
>Environment:
Linux, glibc 2.1
>Description:
The program below causes an ICE with gcc 3.2:

$ cat t.cpp; g++ --version; g++ t.cpp
#include <math.h>

template <class T>
void foo ()
{
    if (HUGE_VAL == 0.0L);
}

int main ()
{
    foo<int>();
}

g++ (GCC) 3.2
Copyright (C) 2002 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.

t.cpp: In function `void foo() [with T = int]':
t.cpp:11:   instantiated from here
t.cpp:6: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Preprocessed with this version of glibc, foo contains this:

template <class T>
void foo ()
{
    if ((__extension__ ((union { unsigned char __c[8]; double __d; }) { __c: { 0
, 0, 0, 0, 0, 0, 0xf0, 0x7f } }).__d) == 0.0L);
}
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-10-15  2:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-14 19:06 sebor [this message]
2002-10-27  7:30 lerdsuwa
2003-01-27 22:14 nathan

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=20021015015739.3351.qmail@sources.redhat.com \
    --to=sebor@roguewave.com \
    --cc=gcc-gnats@gcc.gnu.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).