-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Closed
Description
For instance, one can write:
#![feature(no_core)]
#![no_core]
#![feature(lang_items)]
#[lang = "sized"]
trait Sized {}
#[lang = "start"]
fn start() {}
fn main() {}which leads to:
Incorrect number of arguments passed to called function!
call void @_ZN10playground5start17h74a17c08fe33779bE(i8** bitcast (void ()* @_ZN10playground4main17ha7cb2a96f9beaebbE to i8**), i64 %4, i8** %1)
SExt only operates on integer
%5 = sext void <badref> to i32
in function main
LLVM ERROR: Broken function found, compilation aborted!
error: could not compile `playground`
This can also cause ICEs (such as #83471, whose specific cause I have addressed in #86246 without solving the general problem), and it allows for all kinds of nonsensical lang items to be defined.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.