[Issue 12153] Ternary operator on static array lvalues creates copy

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 19 01:47:35 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12153


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
           Severity|normal                      |major


--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2014-02-19 01:47:31 PST ---
(In reply to comment #1)
> Sigh, the backend sees
> 
> int[1] i = 0;
> int[1] j = 0;
> bool b = true;
> (b ? i : j)[] = [4];
> assert(i == [4]);
> return 0;
> 
> Another bug caused by lowering static array ops to slice ops.

Translating to the slice ops is not a problem. This is a glue-layer bug for
cond expression.

https://github.com/D-Programming-Language/dmd/pull/3285

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list