Skip to content

Commit

Permalink
Issue 15581: Disabling bounds checking in ForEachStatement
Browse files Browse the repository at this point in the history
  • Loading branch information
gchatelet committed Feb 20, 2016
1 parent eb8c2c7 commit b2cfb9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/statement.d
Original file line number Diff line number Diff line change
Expand Up @@ -2499,7 +2499,9 @@ public:
}

// T value = tmp[key];
value._init = new ExpInitializer(loc, new IndexExp(loc, new VarExp(loc, tmp), new VarExp(loc, key)));
IndexExp indexExp = new IndexExp(loc, new VarExp(loc, tmp), new VarExp(loc, key));
indexExp.indexIsInBounds = true; // disabling bounds checking in foreach statements.
value._init = new ExpInitializer(loc, indexExp);
Statement ds = new ExpStatement(loc, value);

if (dim == 2)
Expand Down

0 comments on commit b2cfb9b

Please sign in to comment.