This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17655] New: g++ getting SEGFAULT compilling the code with HUGE_VAL comparasions
- From: "programm at metrocom dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Sep 2004 15:40:25 -0000
- Subject: [Bug c++/17655] New: g++ getting SEGFAULT compilling the code with HUGE_VAL comparasions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc crashes compiling the following code:
(cmdline is g++-3.4 test.cc)
extern "C" {
#include <math.h>
};
template<typename T> void GetFromString()
{
if (HUGE_VAL) {};
// The same result as above
// if (10.0 == HUGE_VAL) {};
};
int main(char argc, char** argv)
{
GetFromString<char>();
};
It reports:
test.cc: In function `void GetFromString() [with T = char]':
test.cc:14: instantiated from here
test.cc:7: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
g++ -v output:
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.2/specs
Configured with: ../gcc-3.4.2/configure --enable-version-specific-runtime-libs
Thread model: posix
gcc version 3.4.2
Preprocessored source is attached.
--
Summary: g++ getting SEGFAULT compilling the code with HUGE_VAL
comparasions
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: programm at metrocom dot ru
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17655