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

[SR-2674] Compiler Bug with Generic Property #45279

Closed
swift-ci opened this issue Sep 17, 2016 · 4 comments
Closed

[SR-2674] Compiler Bug with Generic Property #45279

swift-ci opened this issue Sep 17, 2016 · 4 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software regression swift 3.0

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-2674
Radar None
Original Reporter DanielT1263 (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

OSX X El Capitan v 10.11.6
Xcode v 8.0 (8A218a)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 3.0Regression, CompilerCrash
Assignee None
Priority Medium

md5: b3936f20a14fd6e3773ba65234acbe43

Issue Description:

The code attached compiles fine with Xcode 7/Swift 2.2 but it breaks the complier in Xcode 8/Swift 3.

To reproduce simply drag the attached file into any project and attempt to compile. I marked the offending line with a comment. If that line is removed, then the code will compile.

Error Message:
Call parameter type does not match function signature!
%39 = bitcast i8* %38 to %swift.opaque*, 224
%swift.type* call void %48(%swift.opaque* noalias nocapture %0, %swift.opaque* %39, %swift.type* %8, i8** noalias nocapture %11, %swift.type* %13, i8** %49), 224
LLVM ERROR: Broken function found, compilation aborted!

@belkadan
Copy link
Contributor

   Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"), function init, file /Volumes/Data/swift-public/llvm/lib/IR/Instructions.cpp, line 263.

@rjmccall, look familiar?

@belkadan
Copy link
Contributor

Or @jckarter?

@huonw
Copy link
Mannequin

huonw mannequin commented Oct 11, 2016

Based on the LLVM assert, creduce thinks this is a minimal reproduction:

protocol Producer { func start<L>(listener : L) }
class T {
  init<P : Producer>(producer : P) { _start = producer.start }
  var _start : ()->Void
}

@slavapestov
Copy link
Member

No longer crashes on Swift 3 or master.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software regression swift 3.0
Projects
None yet
Development

No branches or pull requests

4 participants