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

Fix issue 18461 - Do not remove assignments to ambiguous symbols #8015

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/dmd/backend/gother.c
Expand Up @@ -1488,6 +1488,7 @@ STATIC void accumda(elem *n,vec_t DEAD, vec_t POSS)
vec_free(Pr); vec_free(Dr);
break;

case OPrelconst:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is close, but not quite right. The fix is to add a case for OPbt. I'll work on that tomorrow.

case OPvar:
{ symbol *v = n->EV.sp.Vsym;
targ_size_t voff = n->EV.sp.Voffset;
Expand Down
10 changes: 10 additions & 0 deletions test/runnable/b18461.d
@@ -0,0 +1,10 @@
// REQUIRED_ARGS: -O -inline -release
import core.bitop;

void main()
{
size_t test_val = 0b0001_0000;

if(bt(&test_val, 4) == 0)
assert(false);
}