This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17655] New: g++ getting SEGFAULT compilling the code with HUGE_VAL comparasions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]