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-2565] Stored value type does not match pointer operand type! (Swift 3, Xcode 8b6 8S201h) #45170

Closed
Frizlab opened this issue Sep 6, 2016 · 8 comments
Assignees
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

Comments

@Frizlab
Copy link

Frizlab commented Sep 6, 2016

Previous ID SR-2565
Radar rdar://problem/28171818
Original Reporter @Frizlab
Type Bug
Status Resolved
Resolution Done
Environment

Xcode 8b6 8S201h

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash
Assignee @slavapestov
Priority Medium

md5: 2dac7ed7a08dbba448e8d5d50b6db6c4

Issue Description:

The following code

import Foundation
class Root {}
class UsesRoot<RootType : Root> {}
class Test<RootType : Root, UsesRootType : UsesRoot<RootType>> : NSObject {}

does not compile with the following error:

Stored value type does not match pointer operand type!
  store %C4Test4Test* %0, %C4Test4Test.1** %2, align 8, !dbg !127
 %C4Test4Test.1*LLVM ERROR: Broken function found, compilation aborted!
2016-09-06 13:48:19.730 xcodebuild[16119:1187105]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-11239.2/IDEFoundation/Playgrounds/IDEPlaygroundAuxiliarySourceCompilerOperation.m:386
Details:  Unable to read diagnostics from file "/Users/frizlab/Library/Developer/Xcode/DerivedData/Test-flmnumpgoaapqvggviqguvnfexru/Build/Intermediates/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/x86_64/Test.dia" (Invalid File): Invalid diagnostics signature
Function: void XCGenerateDiagnosticsFromFile(NSString *__strong, NSString *__strong, NSDictionary *__strong, NSDictionary *__strong, IDEActivityLogSectionRecorder *__strong, BOOL (^__strong)(IDEActivityLogMessage *__strong))
Thread:   <NSThread: 0x7f84f5d2f290>{number = 5, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

when compiled with

-Onone

but compiles with

 -O -whole-module-optimization

Also, the code compiles fine whatever the options given to Swift when Test does not inherits from NSObject.

@belkadan
Copy link
Contributor

belkadan commented Sep 6, 2016

@slavapestov, know anything about this one?

@swift-ci
Copy link
Collaborator

Comment by Tapani Saarinen (JIRA)

Also seeing something like this. Swift syntax should be frozen and all bugs fixed before releasing yet another super buggy 4.0.

Stored value type does not match pointer operand type!
store %C11MyFramework15ModelObject* %32, %C11MyFramework7Comment** %36, align 8, 1136
%C11MyFramework7Comment*LLVM ERROR: Broken function found, compilation aborted!

@slavapestov
Copy link
Member

Fixed on master.

@swift-ci
Copy link
Collaborator

swift-ci commented Apr 7, 2017

Comment by Sommer (JIRA)

I'm currently seeing this issue with Swift 3.1, Xcode 8.3 (8E162)

Here's the message I get:

Stored value type does not match pointer operand type!
store %C8ChorusUI30AbstractChatMessageContentView* %177, %C8ChorusUI29WorkoutChatMessageContentView** %181, align 8, 317
%C8ChorusUI29WorkoutChatMessageContentView*LLVM ERROR: Broken function found, compilation aborted!

@slavapestov
Copy link
Member

The reduced test case at the top works though, so it must be something else.

Can you try a 4.0 development snapshot and see if you get a different error? With asserts enabled, we might be able to diagnose what's going on better.

@swift-ci
Copy link
Collaborator

swift-ci commented Apr 7, 2017

Comment by Sommer (JIRA)

Will do - will report back

@belkadan
Copy link
Contributor

belkadan commented Apr 8, 2017

I think aschwaighofer@apple.com (JIRA User) just fixed your issue, Sommer. #8588

@belkadan
Copy link
Contributor

Marking the issue Resolved again. Let us know if there are still problems in this area!

@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
Projects
None yet
Development

No branches or pull requests

5 participants