d: foreach over a tuple doesn't work on 16-bit targets (PR100999)
authorIain Buclaw <ibuclaw@gdcproject.org>
Fri, 11 Jun 2021 17:33:07 +0000 (19:33 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Fri, 11 Jun 2021 17:42:13 +0000 (19:42 +0200)
commit68f46862d33707450bdf70cfddd91ae2a12527a8
treee00210213fae352339fe0a8e8ef328d84f9131e1
parentb13f297f01c943aa167f7c6eb94bed40dce0d553
d: foreach over a tuple doesn't work on 16-bit targets (PR100999)

Improves semantic passes in the front-end around the `foreach' and
`static foreach' statements to be more resilient to compiling in a
minimal D runtime environment.  Checking of the index type has been
improved as well so now there won't be needless compiler errors when
using 8 or 16-bit integers as index types when the size fits the
expected loop range.

gcc/d/ChangeLog:

PR d/100999
* dmd/MERGE: Merge upstream dmd 7a3808254.

libphobos/ChangeLog:

PR d/100999
* src/MERGE: Merge upstream phobos 55bb17543.
32 files changed:
gcc/d/dmd/MERGE
gcc/d/dmd/cond.c
gcc/d/dmd/dinterpret.c
gcc/d/dmd/expression.c
gcc/d/dmd/expressionsem.c
gcc/d/dmd/statementsem.c
gcc/testsuite/gdc.test/compilable/extra-files/minimal/object.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/interpret5.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/minimal3.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/staticforeach.d
gcc/testsuite/gdc.test/compilable/test21742.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/test22006.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/b12504.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/diag16976.d
gcc/testsuite/gdc.test/fail_compilation/fail117.d
gcc/testsuite/gdc.test/fail_compilation/fail22006.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/fail238_m32.d
gcc/testsuite/gdc.test/fail_compilation/fail238_m64.d
gcc/testsuite/gdc.test/fail_compilation/fail7424b.d
gcc/testsuite/gdc.test/fail_compilation/fail7424c.d
gcc/testsuite/gdc.test/fail_compilation/fail7424d.d
gcc/testsuite/gdc.test/fail_compilation/fail7424e.d
gcc/testsuite/gdc.test/fail_compilation/fail7424f.d
gcc/testsuite/gdc.test/fail_compilation/fail7424g.d
gcc/testsuite/gdc.test/fail_compilation/fail7424h.d
gcc/testsuite/gdc.test/fail_compilation/fail7424i.d
gcc/testsuite/gdc.test/fail_compilation/fail9766.d
gcc/testsuite/gdc.test/fail_compilation/ice9406.d
gcc/testsuite/gdc.test/fail_compilation/test21927.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/test21939.d [new file with mode: 0644]
libphobos/src/MERGE
libphobos/src/std/typecons.d