mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SR-10590 | rdar://problem/50968433 appears to be caused by an LLVM JIT bug where GOT-equivalent globals get emitted with incorrect alignment. Not marking the GOT equivalent as unnamed_addr (which prevents it from getting folded into the GOT, or other equivalent constants) appears to work around the issue.
18 lines
413 B
Swift
18 lines
413 B
Swift
// RUN: %target-run-simple-swift
|
|
// REQUIRES: executable_test
|
|
|
|
struct Container<Base, Value, Content>
|
|
where Base: Collection
|
|
{
|
|
var base: Base
|
|
var elementPath: KeyPath<Base.Element, Value>
|
|
var content: (Value) -> Content
|
|
}
|
|
|
|
let x = Container(base: 1...10, elementPath: \.bitWidth) {
|
|
return String($0, radix: 2)
|
|
}
|
|
|
|
// CHECK: i hope we passed the audition
|
|
print("i hope we passed the audition")
|