Files
swift-mirror/validation-test/compiler_crashers/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift
practicalswift 71845c060b [swiftc (27 vs. 5507)] Add crasher in swift::constraints::ConstraintSystem::diagnoseFailureForExpr(...)
Add test case for crash triggered in `swift::constraints::ConstraintSystem::diagnoseFailureForExpr(...)`.

Current number of unresolved compiler crashers: 27 (5507 resolved)

Stack trace:

```
0 0x000000000394f3c8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/path/to/swift/bin/swift+0x394f3c8)
1 0x000000000394fb06 SignalHandler(int) (/path/to/swift/bin/swift+0x394fb06)
2 0x00007f1eb6c813e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x113e0)
3 0x00007f1eb51a7428 gsignal /build/glibc-Qz8a69/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f1eb51a902a abort /build/glibc-Qz8a69/glibc-2.23/stdlib/abort.c:91:0
5 0x00000000038eb86d llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) (/path/to/swift/bin/swift+0x38eb86d)
6 0x000000000133bf29 (anonymous namespace)::FailureDiagnosis::diagnoseContextualConversionError() (/path/to/swift/bin/swift+0x133bf29)
7 0x00000000013395a8 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) (/path/to/swift/bin/swift+0x13395a8)
8 0x00000000013402f2 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) (/path/to/swift/bin/swift+0x13402f2)
9 0x000000000127b718 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) (/path/to/swift/bin/swift+0x127b718)
10 0x000000000127ed46 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) (/path/to/swift/bin/swift+0x127ed46)
11 0x000000000132430c getCallerDefaultArg(swift::constraints::ConstraintSystem&, swift::DeclContext*, swift::SourceLoc, swift::ConcreteDeclRef&, unsigned int) (/path/to/swift/bin/swift+0x132430c)
12 0x000000000133269f (anonymous namespace)::ExprRewriter::coerceCallArguments(swift::Expr*, swift::Type, llvm::PointerUnion<swift::ApplyExpr*, llvm::PointerEmbeddedInt<unsigned int, 2> >, llvm::ArrayRef<swift::Identifier>, bool, swift::constraints::ConstraintLocatorBuilder) (/path/to/swift/bin/swift+0x133269f)
13 0x000000000131e5a8 (anonymous namespace)::ExprRewriter::finishApply(swift::ApplyExpr*, swift::Type, swift::constraints::ConstraintLocatorBuilder) (/path/to/swift/bin/swift+0x131e5a8)
14 0x0000000001334053 (anonymous namespace)::ExprRewriter::visitApplyExpr(swift::ApplyExpr*) (/path/to/swift/bin/swift+0x1334053)
15 0x000000000131b074 (anonymous namespace)::ExprRewriter::walkToExprPost(swift::Expr*) (/path/to/swift/bin/swift+0x131b074)
16 0x0000000001320671 (anonymous namespace)::ExprWalker::walkToExprPost(swift::Expr*) (/path/to/swift/bin/swift+0x1320671)
17 0x000000000143989c swift::Expr::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0x143989c)
18 0x0000000001317ecf swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) (/path/to/swift/bin/swift+0x1317ecf)
19 0x000000000127edd0 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) (/path/to/swift/bin/swift+0x127edd0)
20 0x00000000012fe305 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0x12fe305)
21 0x00000000012fd156 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) (/path/to/swift/bin/swift+0x12fd156)
22 0x0000000001312630 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x1312630)
23 0x0000000000f86726 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0xf86726)
24 0x00000000004a7016 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4a7016)
25 0x0000000000465137 main (/path/to/swift/bin/swift+0x465137)
26 0x00007f1eb5192830 __libc_start_main /build/glibc-Qz8a69/glibc-2.23/csu/../csu/libc-start.c:325:0
27 0x00000000004627d9 _start (/path/to/swift/bin/swift+0x4627d9)
```
2017-03-16 10:48:51 +01:00

11 lines
437 B
Swift

// This source file is part of the Swift.org open source project
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
// RUN: not --crash %target-swift-frontend %s -emit-ir
func t(UInt=__FUNCTION__
func&t(