Skip to content

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

Description

@marijnh

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() {
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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