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-10221] Compiler bug in Xcode 10.2 for Enums with Associated Values #52621

Closed
swift-ci opened this issue Mar 28, 2019 · 3 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself optimized only Flag: An issue whose reproduction requires optimized compilation regression swift 5.0

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-10221
Radar rdar://problem/49380548
Original Reporter ullstrm (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Xcode 10.2 (10E125), Swift5 and Swift4.2

Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, 5.0Regression, Miscompile, OptimizedOnly
Assignee None
Priority Medium

md5: 3b3b7cc3c14c36fc6bfe85aa31879bb9

Issue Description:

This code produces very odd results in release builds in Xcode 10.2 with [-O] Optimization Level. (See attached screenshot).

https://gist.github.com/ullstrm/8894f52c30e6eb858c208ebcfaf7f77c

My theory is that it has something to do with the fact that the AssociatedValue is a ObjC-enum, since it works with a custom Enum as Associated Value.

@swift-ci
Copy link
Collaborator Author

Comment by Martin Johannesson (JIRA)

I made some more observations regarding this issue. See comments in this gist:

https://gist.github.com/memfrag/71e68335a39622e200a6eb99b7609e26

@belkadan
Copy link
Contributor

belkadan commented Apr 5, 2019

Arnold fixed this one: #23631

@AnnaZaks
Copy link
Mannequin

AnnaZaks mannequin commented Aug 9, 2019

ullstrm (JIRA User), Could you verify if the problem is fixed and if so move the JIRA to "Closed"?

Thanks!
Anna

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 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 optimized only Flag: An issue whose reproduction requires optimized compilation regression swift 5.0
Projects
None yet
Development

No branches or pull requests

3 participants