Skip to content

"LLVM ERROR: Broken module found, compilation aborted" with closures #23960

Closed
@Kimundi

Description

@Kimundi
#![feature(unboxed_closures)]

fn run_double_ended_test<T, TF, F, IF, E>(_: TF, _: F, _: Vec<E>)
    where TF: Fn() -> T,
          F: Fn<T, Output=IF>,
          IF: Iterator<Item=E>,
{}

fn double_ended_split_char2() {
    run_double_ended_test(|| (|| "foo.bar.baz", || '.'),
                          |s, p| (str::split)(s(), p()),
                          vec!["foo", "bar", "baz"]);
}

fn main() { double_ended_split_char2(); }


Global is external, but doesn't have external or weak linkage!
void (%str_slice*, %closure.1*)* @_ZN24double_ended_split_char212closure.1329E
invalid linkage type for function declaration
void (%str_slice*, %closure.1*)* @_ZN24double_ended_split_char212closure.1329E
Global is external, but doesn't have external or weak linkage!
i32 (%closure.2*)* @_ZN24double_ended_split_char212closure.1331E
invalid linkage type for function declaration
i32 (%closure.2*)* @_ZN24double_ended_split_char212closure.1331E
LLVM ERROR: Broken module found, compilation aborted!
playpen: application terminated with error code 1
Program ended.


Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions