Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions compiler/rustc_const_eval/src/interpret/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -937,8 +937,12 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
// (both global from `alloc_map` and local from `extra_fn_ptr_map`)
if let Some(fn_val) = self.get_fn_alloc(id) {
let align = match fn_val {
FnVal::Instance(instance) => {
self.tcx.codegen_instance_attrs(instance.def).alignment.unwrap_or(Align::ONE)
FnVal::Instance(_instance) => {
// FIXME: Until we have a clear design for the effects of align(N) functions
// on the address of function pointers, we don't consider the align(N)
// attribute on functions in the interpreter.
//self.tcx.codegen_instance_attrs(instance.def).alignment.unwrap_or(Align::ONE)
Align::ONE
}
// Machine-specific extra functions currently do not support alignment restrictions.
FnVal::Other(_) => Align::ONE,
Expand Down
25 changes: 0 additions & 25 deletions src/tools/miri/tests/pass/fn_align.rs

This file was deleted.

Loading