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 17489 - ICE in ddmd/argtypes.d #6914

Merged
merged 1 commit into from
Jun 26, 2017

Conversation

WalterBright
Copy link
Member

This replaces #6902 by moving the check to where it should be - errors should propagate up the AST.

@dlang-bot
Copy link
Contributor

dlang-bot commented Jun 17, 2017

Thanks for your pull request, @WalterBright!

Bugzilla references

Fix Bugzilla Description
17489 ICE in ddmd/argtypes.d

@WalterBright
Copy link
Member Author

Why would the circleci fail where the autotester passes?

@ibuclaw
Copy link
Member

ibuclaw commented Jun 19, 2017

 ... fail_compilation/fail301.d     ()
Test failed.  The logged output:
../src/dmd -conf= -m64 -Ifail_compilation -verrors=0   -odtest_results/fail_compilation -oftest_results/fail_compilation/fail301_0.o -c fail_compilation/fail301.d
fail_compilation/fail301.d(11): Error: need 'this' for 'guard' of type 'int'
core.exception.AssertError@ddmd/argtypes.d(201): Assertion failure
----------------
??:? _d_assertp [0x786878]
??:? _ZN10toArgTypes10ToArgTypes12argtypemergeEP4TypeS2_j [0x5046f4]
??:? _ZN10toArgTypes10ToArgTypes5visitEP10TypeStruct [0x5050a1]
??:? _ZN10TypeStruct6acceptEP7Visitor [0x642a52]
??:? _Z10toArgTypesP4Type [0x5040f9]
??:? _ZN17StructDeclaration12finalizeSizeEv [0x591f7f]
??:? _ZN20AggregateDeclaration13determineSizeE3Loc [0x501be2]
??:? _ZN20AggregateDeclaration9semantic2EP5Scope [0x5012f1]
??:? _ZN16TemplateInstance9semantic2EP5Scope [0x5ab224]
??:? _ZN17StructDeclaration8semanticEP5Scope [0x591852]
??:? _ZN6Module19runDeferredSemanticEv [0x58412a]
??:? _ZN16TemplateInstance13expandMembersEP5Scope [0x5b0168]
??:? _ZN16TemplateInstance16tryExpandMembersEP5Scope [0x5b01ea]
??:? _ZN16TemplateInstance8semanticEP5ScopeP5ArrayIP10ExpressionE [0x5aa680]
??:? _ZN16TemplateInstance8semanticEP5Scope [0x5ab051]
??:? _ZN12TypeInstance7resolveE3LocP5ScopePP10ExpressionPP4TypePP7Dsymbolb [0x63f5b9]
??:? _ZN12TypeInstance8semanticE3LocP5Scope [0x63f6d4]
??:? _ZN14VarDeclaration8semanticEP5Scope [0x543e88]
??:? _ZN14DeclarationExp8semanticEP5Scope [0x5cd678]
??:? _ZN24StatementSemanticVisitor5visitEP12ExpStatement [0x6833bd]
??:? _ZN12ExpStatement6acceptEP7Visitor [0x67517b]
??:? ddmd.statement.Statement ddmd.statementsem.semantic(ddmd.statement.Statement, ddmd.dscope.Scope*) [0x693c2c]
??:? _ZN24StatementSemanticVisitor5visitEP17CompoundStatement [0x683705]
??:? _ZN17CompoundStatement6acceptEP7Visitor [0x675aa7]
??:? ddmd.statement.Statement ddmd.statementsem.semantic(ddmd.statement.Statement, ddmd.dscope.Scope*) [0x693c2c]
??:? _ZN15FuncDeclaration9semantic3EP5Scope [0x5f5113]
??:? _ZN6Module9semantic3EP5Scope [0x583bc9]
??:? int ddmd.mars.tryMain(ulong, const(char)**) [0x628287]
??:? _Dmain [0x629628]


==============================
Test failed: 
expected:
----
fail_compilation/fail301.d(11): Error: need 'this' for 'guard' of type 'int'
fail_compilation/fail301.d(22): Error: template instance fail301.bug3305!0 error instantiating
----
actual:
----
fail_compilation/fail301.d(11): Error: need 'this' for 'guard' of type 'int'
core.exception.AssertError@ddmd/argtypes.d(201): Assertion failure
----------------
??:? _d_assertp [0x786878]
??:? _ZN10toArgTypes10ToArgTypes12argtypemergeEP4TypeS2_j [0x5046f4]
??:? _ZN10toArgTypes10ToArgTypes5visitEP10TypeStruct [0x5050a1]
??:? _ZN10TypeStruct6acceptEP7Visitor [0x642a52]
??:? _Z10toArgTypesP4Type [0x5040f9]
??:? _ZN17StructDeclaration12finalizeSizeEv [0x591f7f]
??:? _ZN20AggregateDeclaration13determineSizeE3Loc [0x501be2]
??:? _ZN20AggregateDeclaration9semantic2EP5Scope [0x5012f1]
??:? _ZN16TemplateInstance9semantic2EP5Scope [0x5ab224]
??:? _ZN17StructDeclaration8semanticEP5Scope [0x591852]
??:? _ZN6Module19runDeferredSemanticEv [0x58412a]
??:? _ZN16TemplateInstance13expandMembersEP5Scope [0x5b0168]
??:? _ZN16TemplateInstance16tryExpandMembersEP5Scope [0x5b01ea]
??:? _ZN16TemplateInstance8semanticEP5ScopeP5ArrayIP10ExpressionE [0x5aa680]
??:? _ZN16TemplateInstance8semanticEP5Scope [0x5ab051]
??:? _ZN12TypeInstance7resolveE3LocP5ScopePP10ExpressionPP4TypePP7Dsymbolb [0x63f5b9]
??:? _ZN12TypeInstance8semanticE3LocP5Scope [0x63f6d4]
??:? _ZN14VarDeclaration8semanticEP5Scope [0x543e88]
??:? _ZN14DeclarationExp8semanticEP5Scope [0x5cd678]
??:? _ZN24StatementSemanticVisitor5visitEP12ExpStatement [0x6833bd]
??:? _ZN12ExpStatement6acceptEP7Visitor [0x67517b]
??:? ddmd.statement.Statement ddmd.statementsem.semantic(ddmd.statement.Statement, ddmd.dscope.Scope*) [0x693c2c]
??:? _ZN24StatementSemanticVisitor5visitEP17CompoundStatement [0x683705]
??:? _ZN17CompoundStatement6acceptEP7Visitor [0x675aa7]
??:? ddmd.statement.Statement ddmd.statementsem.semantic(ddmd.statement.Statement, ddmd.dscope.Scope*) [0x693c2c]
??:? _ZN15FuncDeclaration9semantic3EP5Scope [0x5f5113]
??:? _ZN6Module9semantic3EP5Scope [0x583bc9]
??:? int ddmd.mars.tryMain(ulong, const(char)**) [0x628287]
??:? _Dmain [0x629628]
----

@ibuclaw
Copy link
Member

ibuclaw commented Jun 19, 2017

Essentially, my complaint in #6746. All other testers build with asserts turned off.

@WalterBright
Copy link
Member Author

Thanks, @ibuclaw , I can repro it now.

@WalterBright WalterBright force-pushed the fix17489-2 branch 3 times, most recently from 5012a78 to 424aed3 Compare June 20, 2017 08:12
@WalterBright
Copy link
Member Author

@ibuclaw this is ready to rock now

@dlang-bot dlang-bot merged commit ef4cda8 into dlang:master Jun 26, 2017
@WalterBright WalterBright deleted the fix17489-2 branch June 26, 2017 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants