I added it to bugzilla here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111396
Since this only reproduces part of the issue, please let me test again with rustc_codegen_gcc after adding the missing fix. I confirmed that the fix is in https://github.com/antoyo/gcc/commit/9d5b6b20efa20825926196759d50706a604c64a8 so you might as well include all of this (except the linetable condition in toplev.cc). On Tue, 2023-09-12 at 14:38 -0400, David Malcolm wrote: > On Tue, 2023-09-12 at 13:36 -0400, Antoni Boucher wrote: > > In the mean time, here's a (Rust) reproducer for the issue: > > > > fn main() { > > for _ in 0..5 { > > let context = Context::default(); > > context.add_command_line_option("-flto"); > > > > context.set_optimization_level(OptimizationLevel::Aggressive); > > context.add_driver_option("-nostdlib"); > > > > let int_type = context.new_type::<i32>(); > > > > let function = context.new_function(None, > > FunctionType::Exported, int_type, &[], "main", false); > > let block = function.new_block("start"); > > let value = context.new_rvalue_from_int(int_type, 42); > > block.end_with_return(None, value); > > > > context.compile_to_file(OutputKind::Executable, "my_exe"); > > } > > } > > Can we get this in bugzilla please? If you generate a .c version of > the context (via gcc_jit_context_dump_reproducer_to_file) I can try > to > debug it. > > Thanks > Dave >