Skip to content

interrupt service routine should have a pointer as the first argument #833

@matthiaskrgr

Description

@matthiaskrgr

snippet:

//@compile-flags: -Zcodegen-backend=gcc -Clink-dead-code=true --crate-type=lib
#![feature(abi_x86_interrupt)]
pub extern "x86-interrupt" fn f(a: i64) {}

Version information

rustc 1.95.0-nightly (a18e6d9d1 2026-01-24)
binary: rustc
commit-hash: a18e6d9d1473d9b25581dd04bef6c7577999631c
commit-date: 2026-01-24
host: x86_64-unknown-linux-gnu
release: 1.95.0-nightly
LLVM version: 21.1.8

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zcodegen-backend=gcc -Clink-dead-code=true --crate-type=lib

Program output

warning: unused variable: `a`
 --> /tmp/icemaker_global_tempdir.ixZrmjiu4rgx/rustc_testrunner_tmpdir_reporting.fd7j7VvF0nFL/mvce.rs:2:33
  |
2 | pub extern "x86-interrupt" fn f(a: i64) {}
  |                                 ^ help: if this is intentional, prefix it with an underscore: `_a`
  |
  = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default

libgccjit.so: error: : interrupt service routine should have a pointer as the first argument
error: failed to build archive at `outputfile`: failed to open object file: No such file or directory (os error 2)

error: aborting due to 1 previous error; 1 warning emitted


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions