public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug d/100999] d: foreach over a tuple doesn't work on 16-bit targets Date: Fri, 11 Jun 2021 18:33:05 +0000 [thread overview] Message-ID: <bug-100999-4-3ENH9nNuFl@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100999-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100999 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>: https://gcc.gnu.org/g:a30552af7073aba16af6798a1e6cd0a345b06586 commit r11-8553-ga30552af7073aba16af6798a1e6cd0a345b06586 Author: Iain Buclaw <ibuclaw@gdcproject.org> Date: Fri Jun 11 19:33:07 2021 +0200 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/cond.c (lowerArrayAggregate): Run CTFE interpret on foreach input range. (createTupleType): Don't generate typeinfo when disabled. (lowerNonArrayAggregate): Suppress errors when running type semantic. (staticForeachPrepare): Don't run CTFE interpret from here. * dmd/dinterpret.c (ctfeInterpret): Add more shortcut cases. * dmd/expression.c (Expression::checkPostblit): Don't generate typeinfo when type is missing from library. * dmd/expressionsem.c (resolvePropertiesX): Remove early error. * dmd/statementsem.c (StatementSemanticVisitor::declareVariable): Don't override index type. (StatementSemanticVisitor::makeTupleForeachBody): Check index type is integral and index range fits type size. (StatementSemanticVisitor::visit (ForeachStatement*)): Adjust index range before testing. libphobos/ChangeLog: PR d/100999 * src/std/typecons.d (template Proxy): Check for field or property functions as the else branch. gcc/testsuite/ChangeLog: PR d/100999 * gdc.test/compilable/staticforeach.d: Add new tests. * gdc.test/fail_compilation/diag16976.d: Likewise. * gdc.test/fail_compilation/fail117.d: Likewise. * gdc.test/fail_compilation/fail238_m32.d: Likewise. * gdc.test/fail_compilation/fail238_m64.d: Likewise. * gdc.test/fail_compilation/fail7424b.d: Likewise. * gdc.test/fail_compilation/fail7424c.d: Likewise. * gdc.test/fail_compilation/fail7424d.d: Likewise. * gdc.test/fail_compilation/fail7424e.d: Likewise. * gdc.test/fail_compilation/fail7424f.d: Likewise. * gdc.test/fail_compilation/fail7424g.d: Likewise. * gdc.test/fail_compilation/fail7424h.d: Likewise. * gdc.test/fail_compilation/fail7424i.d: Likewise. * gdc.test/fail_compilation/fail9766.d: Likewise. * gdc.test/fail_compilation/ice9406.d: Likewise. * gdc.test/compilable/extra-files/minimal/object.d: New file. * gdc.test/compilable/interpret5.d: New test. * gdc.test/compilable/minimal3.d: New test. * gdc.test/compilable/test21742.d: New test. * gdc.test/compilable/test22006.d: New test. * gdc.test/fail_compilation/b12504.d: New test. * gdc.test/fail_compilation/fail22006.d: New test. * gdc.test/fail_compilation/test21927.d: New test. * gdc.test/fail_compilation/test21939.d: New test. (cherry picked from commit 68f46862d33707450bdf70cfddd91ae2a12527a8)
next prev parent reply other threads:[~2021-06-11 18:33 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-09 18:10 [Bug d/100999] New: " ibuclaw at gdcproject dot org 2021-06-11 18:16 ` [Bug d/100999] " cvs-commit at gcc dot gnu.org 2021-06-11 18:33 ` cvs-commit at gcc dot gnu.org [this message] 2021-06-11 21:09 ` cvs-commit at gcc dot gnu.org 2021-06-11 21:10 ` ibuclaw at gdcproject dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-100999-4-3ENH9nNuFl@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).