Skip to content

LLVM ERROR since beta 1.65 #102105

Closed as not planned
Closed as not planned
@matthiaskrgr

Description

@matthiaskrgr

Code

#![crate_type = "lib"]
#![feature(rustc_attrs)]

#[rustc_allocator]
pub fn allocator() -> *const i8 {
  std::ptr::null()
}

This code compiles fine with stable 1.63.0 (4b91a6ea7 2022-08-08) but with beta 1.65.0-beta.1 (2a65764f2 2022-09-19) or nightly, you get an llvm error:

Attribute after last parameter!
ptr @_ZN41_0c34bf1b914b0e835c46e4f7f73be047514103529allocator17h7fb349a1bdaf661aE
in function _ZN41_0c34bf1b914b0e835c46e4f7f73be047514103529allocator17h7fb349a1bdaf661aE
LLVM ERROR: Broken function found, compilation aborted!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.F-rustc_attrsInternal rustc attributes gated on the `#[rustc_attrs]` feature gate.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions