[Issue 20092] void[1] auto slicing makes the compiler hang
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Fri Nov 15 02:43:48 UTC 2019
    
    
  
https://issues.dlang.org/show_bug.cgi?id=20092
Basile-z <b2.temp at gmx.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp at gmx.com
--- Comment #1 from Basile-z <b2.temp at gmx.com> ---
The loop happens in 
  dmd.optimize.Expression.Expression_optimize(Expression e, int result, bool
keepLvalue)
But the background problem is that template parameter type deduction gives
`ubyte ` instead of `void`. As a consequence the protections against infinite
recursion when the optimizer visit a CastExpression don't work.
For example by rewriting the call in the test case this way
  (void[1]).init.front!void;
that works but
  (void[1]).init.front!ubyte;
loops...
--
    
    
More information about the Digitalmars-d-bugs
mailing list