Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Fix Bug 283: Wrong codegen in expanded CLEANUP_POINT_EXPR. #606

Merged
merged 1 commit into from
Jan 28, 2018

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jan 27, 2018

Not all front-end temporaries that require auto destruction have their lifetime restricted to the CLEANUP_POINT_EXPR they are enclosed in. This fixes a bug where temporaries were being assumed clobbered too early during optimization.

gcc/d/ChangeLog Outdated
@@ -1,3 +1,9 @@
2018-01-27 Iain Buclaw <[email protected]>

* decl.cc (DeclVisitor::visit(VarDeclaration)): Don't re-used existing
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo re-use?

Not all temporaries that require auto destruction have their lifetime
restricted to the CLEANUP_POINT_EXPR they are enclosed in.  So only
leave out variables marked STCexptemp.  This fixes a bug where
temporaries were being assumed clobbered too early during optimization.
@ibuclaw ibuclaw merged commit 1413f62 into D-Programming-GDC:master Jan 28, 2018
@ibuclaw ibuclaw deleted the bug283 branch January 28, 2018 11:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants