c++/8228: ICE on HUGE_VAL in template code
sebor@roguewave.com
sebor@roguewave.com
Mon Oct 14 19:06:00 GMT 2002
>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:
More information about the Gcc-bugs
mailing list