Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug ranges wrong in for loop with non-int32 counters #84

Closed
KevinRansom opened this issue Jan 21, 2015 · 1 comment
Closed

Debug ranges wrong in for loop with non-int32 counters #84

KevinRansom opened this issue Jan 21, 2015 · 1 comment
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Ready

Comments

@KevinRansom
Copy link
Member

This was originally opened on CodePlex by latkin

If I define a simple for loop with a signed-integer counter, debug behavior is as expected:

But if I change the counter to something besides a normal signed int (e.g. an unsigned int, shown below), line #2 takes 2 debug steps to pass through:

pic1 -> pic2

vs
pic3 -> pic4 --> pic5

From peeking at the IL, looks like first example is compiled as normal ‘for’ loop as in C#, but second example is implemented with an IEnumerable and various plumbing to work with it.

comments
latkin wrote Jun 2, 2014 at 1:45 PM
Possibly we could generate the same optimized loop code for all integer types

@latkin latkin added the Bug label Jan 22, 2015
@dsyme dsyme added the pri-2 label May 12, 2015
@KevinRansom KevinRansom removed the pri-2 label Dec 4, 2015
@dsyme dsyme added Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Area-Compiler labels Jan 8, 2016
@dsyme dsyme added the Ready label Jun 28, 2016
@dsyme
Copy link
Contributor

dsyme commented Jul 22, 2016

Fixed by above PR

@dsyme dsyme closed this as completed Jul 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Ready
Projects
None yet
Development

No branches or pull requests

3 participants