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

Issue 4940 - ICE(symbol.c): Accessing tuple-typed field of struct literal with user-defined constructor #609

Merged
merged 3 commits into from
Jan 17, 2012

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Jan 6, 2012

http://d.puremagic.com/issues/show_bug.cgi?id=4940

Explanation of bug mechanism:
http://d.puremagic.com/issues/show_bug.cgi?id=4940#c3

e1.tupleof should be translated by the same way in DotVarExp::semantic() to save side effect of e1.

2012/01/10
Issue 7263 - Tuple slicing + -O switch causes "used before set" error
Tuple slicing has same problem.

@9rnsr 9rnsr closed this Jan 6, 2012
@9rnsr 9rnsr reopened this Jan 6, 2012
9rnsr added 3 commits January 12, 2012 17:45
From: te->exps is ((DeclarationExp __tup = einit, __tup.var_0), __tup.var_1, ..., __tup.var_n) .
To:   te->exps is ((DeclarationExp __tup = einit, __tup).var_0, __tup.var_1, ..., __tup.var_n) .

Now can extract einit with ((DotVarExp *)(*te->exps)[0])->isTemp().

On compile-time tuple access in IndexExp, restore einit to keep side-effect.
WalterBright added a commit that referenced this pull request Jan 17, 2012
Issue 4940 - ICE(symbol.c): Accessing tuple-typed field of struct literal with user-defined constructor
@WalterBright WalterBright merged commit d6ede2e into dlang:master Jan 17, 2012
braddr pushed a commit to braddr/dmd that referenced this pull request Oct 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants