2024-05-29 04:29:16 -05:00
|
|
|
// Non-regression test for issues #125474, #125484, #125646, with the repro taken from #125484. Some
|
|
|
|
// queries use "used dependencies" while others use "speculatively loaded dependencies", and an
|
|
|
|
// indexing ICE appeared in some cases when these were unexpectedly used in the same context.
|
|
|
|
|
|
|
|
// FIXME: this should probably be a UI test instead of a run-make test, but I *cannot* find a way to
|
|
|
|
// make compiletest annotations reproduce the ICE with the minimizations from issues #125474 and
|
|
|
|
// #125484.
|
|
|
|
|
2024-06-06 14:34:34 -05:00
|
|
|
use run_make_support::rustc;
|
2024-05-29 04:29:16 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// The dependency is not itself significant, apart from sharing a name with one of main's
|
|
|
|
// modules.
|
|
|
|
rustc().crate_name("same").crate_type("rlib").input("dependency.rs").run();
|
|
|
|
|
|
|
|
// Here, an ICE would happen when building the linker command.
|
2024-06-06 14:34:34 -05:00
|
|
|
rustc().input("main.rs").extern_("same", "libsame.rlib").run();
|
2024-05-29 04:29:16 -05:00
|
|
|
}
|