-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
compilerThe Swift compiler itselfThe Swift compiler itself
Description
Previous ID | SR-12206 |
Radar | rdar://problem/59496023 |
Original Reporter | @jckarter |
Type | Sub-task |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Sub-task |
Assignee | None |
Priority | Medium |
md5: 536212832ea3b9588bb83c4037b9f167
Parent-Task:
Issue Description:
This:
enum Foo {
case foo(bar: Int = 0)
case foo(bas: Int = 0)
case bar
}
crashes because we mangle the same symbol name for both default argument generators:
Assertion failed: (F->empty() && "already emitted function?!"), function preEmitFunction, file /Users/jgroff/swift/public/swift/lib/SILGen/SILGen.cpp, line 727.
Stack dump:
0. Program arguments: /Users/jgroff/swift/public/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/bin/swift -frontend -c -primary-file /Users/jgroff/foo.swift -target x86_64-apple-darwin19.0.0 -enable-objc-interop -color-diagnostics -module-name foo -o /var/folders/t7/glhhlkys4272r_9964jlvp4c0000gn/T/foo-7e9e81.o
1. Swift version 5.2-dev (LLVM 9505d8980c, Swift 1403e75a0e)
2. While evaluating request SILGenSourceFileRequest(SIL Generation for file "/Users/jgroff/foo.swift")
0 swift 0x000000010ca52328 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 swift 0x000000010ca51575 llvm::sys::RunSignalHandlers() + 85
2 swift 0x000000010ca52926 SignalHandler(int) + 262
3 libsystem_platform.dylib 0x00007fff6725db1d _sigtramp + 29
4 swift 0x000000010f264398 cmark_strbuf__initbuf + 190843
5 libsystem_c.dylib 0x00007fff67133a08 abort + 120
6 libsystem_c.dylib 0x00007fff67132cc2 err + 0
7 swift 0x000000010cba56a3 swift::Lowering::SILGenModule::preEmitFunction(swift::SILDeclRef, llvm::PointerUnion<swift::ValueDecl*, swift::Expr*>, swift::SILFunction*, swift::SILLocation) (.cold.6) + 35
8 swift 0x0000000108cdd853 swift::Lowering::SILGenModule::preEmitFunction(swift::SILDeclRef, llvm::PointerUnion<swift::ValueDecl*, swift::Expr*>, swift::SILFunction*, swift::SILLocation) + 787
9 swift 0x0000000108ce5544 swift::Lowering::SILGenModule::emitDefaultArgGenerator(swift::SILDeclRef, swift::ParamDecl*)::$_4::operator()(swift::SILFunction*) const + 116
10 swift 0x0000000108cdf02a swift::Lowering::SILGenModule::emitDefaultArgGenerator(swift::SILDeclRef, swift::ParamDecl*) + 394
11 swift 0x0000000108cdde3d swift::Lowering::SILGenModule::emitDefaultArgGenerators(llvm::PointerUnion<swift::ValueDecl*, swift::AbstractClosureExpr*>, swift::ParameterList*) + 93
12 swift 0x0000000108dbb68b (anonymous namespace)::SILGenType::emitType() + 619
13 swift 0x0000000108dbb419 swift::Lowering::SILGenModule::visitNominalTypeDecl(swift::NominalTypeDecl*) + 25
14 swift 0x0000000108ce1933 (anonymous namespace)::SILGenModuleRAII::emitSourceFile(swift::SourceFile*) + 883
15 swift 0x0000000108ce1506 swift::SILGenSourceFileRequest::evaluate(swift::Evaluator&, swift::SILGenDescriptor) const + 182
16 swift 0x0000000108daf3b1 swift::SimpleRequest<swift::SILGenSourceFileRequest, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> > (swift::SILGenDescriptor), (swift::CacheKind)0>::evaluateRequest(swift::SILGenSourceFileRequest const&, swift::Evaluator&) + 33
17 swift 0x0000000108ce7644 llvm::Expected<swift::SILGenSourceFileRequest::OutputType> swift::Evaluator::getResultUncached<swift::SILGenSourceFileRequest>(swift::SILGenSourceFileRequest const&) + 340
18 swift 0x0000000108ce2c95 swift::performSILGeneration(swift::FileUnit&, swift::Lowering::TypeConverter&, swift::SILOptions const&) + 85
19 swift 0x00000001089ff4e9 performCompile(swift::CompilerInstance&, swift::CompilerInvocation const&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 8425
20 swift 0x00000001089fc460 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 4480
21 swift 0x000000010899012d main + 861
22 libdyld.dylib 0x00007fff6705c405 start + 1
<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)
Metadata
Metadata
Assignees
Labels
compilerThe Swift compiler itselfThe Swift compiler itself