Skip to content

__attribute__((aligned(...)) dropped from variable declarations #300

@jrmuizel

Description

@jrmuizel
__attribute__(( aligned (16) )) float FOO[4] = {4, 4, 4, 4};

is translated as

#[no_mangle]
pub static mut FOO: [libc::c_float; 4] =
    [4 as libc::c_int as libc::c_float, 4 as libc::c_int as libc::c_float,
     4 as libc::c_int as libc::c_float, 4 as libc::c_int as libc::c_float];

Because the alignment requirement is dropped it can cause problems for SIMD code.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions