Skip to content

[SR-5012] "warning: pointer not aligned at address" when using keypaths #47589

Open
@aciidgh

Description

@aciidgh
Previous ID SR-5012
Radar rdar://problem/32318829
Original Reporter @aciidb0mb3r
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 7d678c6e72864c0bbfd6450252c0b0de

Issue Description:

struct Version {
    let _version: Int
}

extension Int {
    var isEmpty: Bool {
        return false
    }
}

let kp = \Version._version.isEmpty
$ swiftc x.swift
ld: warning: pointer not aligned at address 0x100004644 (l_keypath + 60 from /var/folders/98/0fcj8gms75z3x7_01g5v_m0h0000gn/T/x-295e1d.o)
ld: warning: pointer not aligned at address 0x10000463C (l_keypath + 52 from /var/folders/98/0fcj8gms75z3x7_01g5v_m0h0000gn/T/x-295e1d.o)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions