d: Fix ICE in setValue, at d/dmd/dinterpret.c:7013
Backports ICE fix from upstream. When casting null to integer or real,
instead of painting the type on the NullExp, we emplace an
IntegerExp/RealExp with the value zero. Same as when casting from
NullExp to bool.
Reviewed-on: https://github.com/dlang/dmd/pull/13172
PR d/110511
gcc/d/ChangeLog:
* dmd/dinterpret.c (Interpreter::visit (CastExp *)): Handle casting
null to int or float.
gcc/testsuite/ChangeLog:
* gdc.test/compilable/test21794.d: New test.
(cherry picked from commit
066385c918485d4cef5c243d3b0691193df382de)