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 19384 - [Codegen] Address of stack temporary is returned #11701

Merged
merged 1 commit into from
Sep 7, 2020

Conversation

WalterBright
Copy link
Member

No description provided.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
19384 critical [Codegen] Address of stack temporary is returned

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

To target stable perform these two steps:

  1. Rebase your branch to upstream/stable:
git rebase --onto upstream/stable upstream/master
  1. Change the base branch of your PR to stable

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#11701"

Copy link
Contributor

@thewilsonator thewilsonator left a comment

Choose a reason for hiding this comment

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

This should probably target stable though

@WalterBright
Copy link
Member Author

It's marked as critical, but has been there for probably 15 years. It's an ugly bug, but pretty hard to trigger.

@WalterBright WalterBright merged commit f3a588f into dlang:master Sep 7, 2020
@WalterBright WalterBright deleted the fix19384 branch September 7, 2020 02:41
@UplinkCoder
Copy link
Member

@WalterBright why the self merge?

@UplinkCoder
Copy link
Member

How does this fix work?

if (ve.var == func.vresult)
goto Lskip;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

this is the best advert for a ?. operator or similar I've seen in a while.

if (s.exp.isBklitExp()?.e1.isVarExp()?.var == func.vresult)
    goto Lskip;

Copy link
Member

Choose a reason for hiding this comment

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

regardless of ?.
Even when stated in one line I am still not sure what this actually matches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants