Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Kimundi opened this issue Apr 1, 2015 · 2 comments
Closed

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

Kimundi opened this issue Apr 1, 2015 · 2 comments
Labels
A-codegen Area: Code generation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@Kimundi
Copy link
Member

Kimundi commented Apr 1, 2015

#![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.


@Kimundi Kimundi added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-codegen Area: Code generation labels Apr 1, 2015
@sanxiyn
Copy link
Member

sanxiyn commented Jun 11, 2015

This seems fixed, presumably by #26079.

@alexcrichton
Copy link
Member

Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants