Skip to content

assigning/initializing pointer to member of struct accessed through mutable pointer triggers assertion #130

Description

@michael-kenzel

the following code will reproduce the issue:

struct Req {}

struct X {
	_: u32,
	req: Req
}

fn test(x: &mut X) {
	let mut p = x;
	let r = &mut p.req;
}

triggers

thorin/src/thorin/primop.cpp:80: thorin::LEA::LEA(const thorin::Def*, const thorin::Def*, thorin::Debug): Assertion `false && "unreachable"' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions