Compiler segfault when compiling specific Swift 3.3 code with optimizations

Originator:zerfgog202
Number:rdar://39218289 Date Originated:5 April 2018
Status:Duplicate/38926982/Closed Resolved:
Product:Developer Tools Product Version:Xcode 9.3 (9E145)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
When compiling the DemoFramework target in this Xcode project with optimizations (Release build configuration), compilation fails with a segfault in the Swift compiler.

Making slight changes to Foo.swift will likely cause the compilation to succeed.
Using the Debug build configuration (or disabling optimizations in the Release configuration) will cause the compilation to succeed.

Steps to Reproduce:
1. Download, extract, and open the attached project
2. Select the Example target
3. Edit scheme > Release configuration
4. Product > Run
5. Note failure

Expected Results:
The compilation should succeed.

Actual Results:
The compilation fails.

Version/Build:
Xcode Version 9.3 (9E145)
SWIFT_VERSION = 3.0;
Apple Swift version 4.1 (swiftlang-902.0.48 clang-902.0.37.1)
Target: x86_64-apple-darwin17.5.0

Configuration:
See project configuration

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!