www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Bug 301] New: cannot cast expression 'value' of type

https://bugzilla.gdcproject.org/show_bug.cgi?id=301

            Bug ID: 301
           Summary: cannot cast expression 'value' of type
                    'immutable(ulong)' to 'longdouble'
           Product: GDC
           Version: development
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gdc
          Assignee: ibuclaw gdcproject.org
          Reporter: araspik protonmail.com

GCC 9-20180715
Compiles without d in --enable-languages successfully
Errors with d in --enable-languages.
Whole error:
/usr/src/build-gcc/./prev-gcc/gdc -B/usr/src/build-gcc/./prev-gcc/
-B/usr/x86_64-pc-linux-gnu/bin/ 
-I/usr/src/build-gcc/prev-x86_64-pc-linux-gnu/libphobos/libdruntime
-I/usr/src/gcc-9-20180715/libphobos/libdruntime
-L/usr/src/build-gcc/prev-x86_64-pc-linux-gnu/libphobos/src/.libs -fno-PIE -c 
-g -O2 -fversion=IN_GCC -frelease    -Wall -Wdeprecated  -o d/dclass.o -MT
d/dclass.o -MMD -MP -MF d/.deps/dclass.TPo -I../../gcc-9-20180715/gcc/d
-J../../gcc-9-20180715/gcc/d/dmd/ddoc ../../gcc-9-20180715/gcc/d/dmd/dclass.d
../../gcc-9-20180715/gcc/d/dmd/dcast.d:377:39: error: cannot cast expression
'value' of type 'immutable(ulong)' to 'longdouble'
                     const f = cast(T) value;
                                       ^
../../gcc-9-20180715/gcc/d/dmd/dcast.d:381:52: error: cannot cast expression
'cast(long)value' of type 'long' to 'longdouble'
                 const f = cast(T) cast(sinteger_t) value;
                                                    ^
../../gcc-9-20180715/gcc/d/dmd/dcast.d:459:22: error: template instance
'dmd.dcast.implicitConvTo.ImplicitConvTo.visit.isLosslesslyConvertibleToFP!(longdouble)'
error instantiating
                 if (!isLosslesslyConvertibleToFP!real_t)
                      ^
make[3]: *** [../../gcc-9-20180715/gcc/d/Make-lang.in:345: d/dcast.o] Error 1

Configure: --enable-languages=c,c++,d --enable-checking=release --prefix=/usr
--disable-nls --disable-multilib --enable-sysroot

Error occurs with/without --enable-sysroot.

-- 
You are receiving this mail because:
You are watching all bug changes.
Jul 30 2018