Skip to content

Basic Block does not have terminator! #2148

Closed

Description

@jruderman
fn three() -> uint { 3u }
fn main() { &three(); }

fails to compile:

Basic Block in function '_ZN4main213E' does not have terminator!
label %4
LLVM ERROR: Broken module, no Basic Block terminator!

Activity

  1. nikomatsakis commented on Apr 8, 2012

    @nikomatsakis
    Contributor

    sounds like it has to do w/ regions. assigning myself.

  2. nikomatsakis commented on Apr 9, 2012

    @nikomatsakis
    Contributor

    Another program that yields the same error, but looks quite different. Not sure if the bug is actually related:

    fn process(idents: [str]) -> [str] { idents }
    
    fn class_field_mutbl(idents: [str], ident: str) -> bool {
        for process(idents).each {|fld|
            if str::eq(ident, fld) {
                ret true;
            }
        }
        fail #fmt["No class field `%s` found", ident];
    }
    
    fn main() { }
    
  3. nikomatsakis commented on Apr 9, 2012

    @nikomatsakis
    Contributor

    Here the use of x.each() turns out to be essential (vec::each() works)

  4. added a commit that references this issue on Sep 22, 2022
  5. added a commit that references this issue on Jun 4, 2024
  6. added a commit that references this issue on Jun 4, 2026
  7. added a commit that references this issue on Aug 21, 2026
    ef98988
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-codegenArea: Code generation

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions