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++/52031] New: G++ crashes when std::size_t is initalized with a float inside a template


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52031

             Bug #: 52031
           Summary: G++ crashes when std::size_t is initalized with a
                    float inside a template
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: joseph.h.garvin@gmail.com


The following code snippet will crash G++ 4.6.1

#include <cstddef>

template<class T>
class B
{
    static const std::size_t A = 1.5;
};

Output:

../crash.H:6:34: internal compiler error: in fold_convert_const_int_from_real,
at fold-const.c:1562
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccdymJZR.out file, please attach this to
your bugreport.

The mentioned file is attached. Note that it must be a templated class for the
crash to occur.


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