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

CTFE pointer and destructor bugs 6933 7185 7187 7194 #602

Merged
merged 6 commits into from
Jan 3, 2012

Conversation

donc
Copy link
Collaborator

@donc donc commented Jan 3, 2012

6933 Segfault(declaration.c) using struct with destructor in CTFE
7185 [CTFE] ICE on changing char array length
7194 [CTFE] Incorrect behaviour with pointers as local struct variable

also regression bug 7187 was reopened because I'd missed a case; this fixes it so it can be closed again.

Don Clugston added 6 commits January 1, 2012 03:14
Unnecessary complexity -- it really just needs the default init literal.
Nested calls can occur during parameter evaluation.
Have to deal with the StringExp case as well as the ArrayLiteralExp case.
This code pre-dates support for pointers. It's obsolete now.
WalterBright added a commit that referenced this pull request Jan 3, 2012
CTFE pointer and destructor bugs 6933 7185 7187 7194
@WalterBright WalterBright merged commit ec7f241 into dlang:master Jan 3, 2012
@WalterBright
Copy link
Member

Fails on OSX with:

../dmd -m32 interpret
true
g
interpret.d(2114): Error: IveGotSwineFlu(Infection(SwineFlu(0,0)),0) is not a co
mpile-time boolean expression
interpret.d(2119): called from here: d.oink()
interpret.d(2133): called from here: quarantine()
interpret.d(2133): while evaluating: static assert(quarantine() == 10)
interpret.d(2125): Error: Mexico(Infection(SwineFlu(0,0)),2) is not a compile-ti
me boolean expression
interpret.d(2130): called from here: m.oink()
interpret.d(2134): called from here: mediafrenzy()
interpret.d(2134): while evaluating: static assert(mediafrenzy() == 2)
interpret.d(2208): Error: DelegStruct(5) is not a compile-time boolean expressio
n
interpret.d(2216): called from here: f(3)
interpret.d(2249): called from here: delegtest4()
interpret.d(2249): while evaluating: static assert(delegtest4() == 8)
interpret.d(2208): Error: DelegStruct(5) is not a compile-time boolean expressio
n
interpret.d(2228): called from here: w2u
interpret.d(2250): called from here: delegtest5()
interpret.d(2250): while evaluating: static assert(delegtest5() == 8)
interpret.d(2208): Error: DelegStruct(5) is not a compile-time boolean expressio
n
interpret.d(2243): called from here: k[1u].z(3)
interpret.d(2251): called from here: delegtest6()
interpret.d(2251): while evaluating: static assert(delegtest6() == 8)

--- errorlevel 256

@WalterBright
Copy link
Member

The failure was for D1.

@WalterBright
Copy link
Member

Reverted until D1 fix.

braddr pushed a commit to braddr/dmd that referenced this pull request Oct 22, 2012
Issue 7796 - std.typecons.Unique is using writeln without importing std.stdio.
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