Skip to content

LLVM module verifier breakage for loop in alt in iter #791

Closed
@marijnh

Description

This code produces:

Stored value type does not match pointer operand type!
  store i1 false, i32* %0
 i32Broken module found, compilation aborted!
Stack dump:
0.  Running pass 'Function Pass Manager' on module 'rust_out'.
1.  Running pass 'Module Verifier' on function '@_ZN1xE'
Aborted

The error goes away if the loop is moved out of the alt, or the iter is made into a fn. Changing the loop to a for-each doesn't make the error go away.

iter x(i: int) -> int {
    alt true {
      true { for j in ~[1] {} }
    }
}

fn main() {
}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions