Files
rust/compiler/rustc_codegen_gcc/example
Jonathan Brouwer 762d317361 Rollup merge of #163533 - Kobzol:cg-gcc-tests, r=bjorn3
Run cg_gcc tests with the correct compiler

Seems like we have been running the tests with the stage 0 compiler all along :surprised: The tests crash with:
```
[BUILD] mini_core
[BUILD] example
[AOT] mini_core_hello_world
warning: the feature `never_type` has been stable since 1.101.0-dev and no longer requires an attribute to enable
 --> example/mini_core_hello_world.rs:4:44
  |
4 |     no_core, unboxed_closures, lang_items, never_type, linkage,
  |                                            ^^^^^^^^^^
  |
  = note: `#[warn(stable_features)]` on by default

thread 'rustc' (1671953) panicked at compiler/rustc_codegen_ssa/src/mir/rvalue.rs:1114:5:
assertion `left == right` failed
  left: __int8_t *  __attribute__((aligned(8)))
 right: void *
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/std/src/panicking.rs:679:5
   1: core::panicking::panic_fmt
             at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/core/src/panicking.rs:80:14
   2: core::panicking::assert_failed_inner
             at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/core/src/panicking.rs:452:17
   3: core::panicking::assert_failed::<gccjit::types::Type, gccjit::types::Type>
             at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/core/src/panicking.rs:407:5
   4: transmute_scalar<rustc_codegen_gcc::builder::Builder>
   5: codegen_transmute_operand<rustc_codegen_gcc::builder::Builder>
             at /home/bjorn/rust/compiler/rustc_codegen_ssa/src/mir/rvalue.rs:419:21
   6: codegen_rvalue_operand<rustc_codegen_gcc::builder::Builder>
             at /home/bjorn/rust/compiler/rustc_codegen_ssa/src/mir/rvalue.rs:625:30
   7: codegen_statement<rustc_codegen_gcc::builder::Builder>
             at /home/bjorn/rust/compiler/rustc_codegen_ssa/src/mir/statement.rs:37:52
```

I'll need help with resolving that from the cg_gcc side (CC @antoyo).

Fixes: https://github.com/rust-lang/rust/issues/163527
2026-10-04 21:28:21 +02:00
..
2026-01-26 17:31:34 +00:00