https://gcc.gnu.org/bugzilla/show_bug.cgi?id=76911

            Bug ID: 76911
           Summary: internal compiler segfault on illegal implicit cast to
                    decimal64
           Product: gcc
           Version: 6.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danielberger at gmail dot com
  Target Milestone: ---

Created attachment 39445
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39445&action=edit
minimal source

minimal code - crash.cpp:

#include <decimal/decimal>
double get_double();
std::decimal::decimal64 test() {
  return get_double();  // invalid conversion
}

gcc 6.1.0
gcc -v -save-temps crash.cpp

this triggers "internal compiler error: Segmentation fault"

previous versions of such as gcc 5.3 give a compilation error:
10 : error: converting to 'std::decimal::decimal64' from initializer list would
use explicit constructor 'std::decimal::decimal64::decimal64(double)'

Reply via email to