2017-01-14 16:49:29 -06:00
|
|
|
#![allow(dead_code)]
|
|
|
|
|
2017-03-25 03:00:49 -05:00
|
|
|
#[repr(align(16.0))] //~ ERROR: invalid `repr(align)` attribute: not an unsuffixed integer
|
2020-01-08 11:02:10 -06:00
|
|
|
//~| ERROR: invalid `repr(align)` attribute: not an unsuffixed integer
|
2019-05-27 00:35:48 -05:00
|
|
|
struct S0(i32);
|
2017-01-14 16:49:29 -06:00
|
|
|
|
2017-03-25 03:00:49 -05:00
|
|
|
#[repr(align(15))] //~ ERROR: invalid `repr(align)` attribute: not a power of two
|
2020-01-08 11:02:10 -06:00
|
|
|
//~| ERROR: invalid `repr(align)` attribute: not a power of two
|
2019-05-27 00:35:48 -05:00
|
|
|
struct S1(i32);
|
2017-01-14 16:49:29 -06:00
|
|
|
|
2018-05-01 15:26:23 -05:00
|
|
|
#[repr(align(4294967296))] //~ ERROR: invalid `repr(align)` attribute: larger than 2^29
|
2020-01-08 11:02:10 -06:00
|
|
|
//~| ERROR: invalid `repr(align)` attribute: larger than 2^29
|
2019-05-27 00:35:48 -05:00
|
|
|
struct S2(i32);
|
2017-01-14 16:49:29 -06:00
|
|
|
|
2018-05-01 15:26:23 -05:00
|
|
|
#[repr(align(536870912))] // ok: this is the largest accepted alignment
|
2019-05-27 00:35:48 -05:00
|
|
|
struct S3(i32);
|
|
|
|
|
|
|
|
#[repr(align(16.0))] //~ ERROR: invalid `repr(align)` attribute: not an unsuffixed integer
|
2020-01-08 11:02:10 -06:00
|
|
|
//~| ERROR: invalid `repr(align)` attribute: not an unsuffixed integer
|
2019-05-27 00:35:48 -05:00
|
|
|
enum E0 { A, B }
|
2018-05-01 15:26:23 -05:00
|
|
|
|
2019-01-31 07:18:31 -06:00
|
|
|
#[repr(align(15))] //~ ERROR: invalid `repr(align)` attribute: not a power of two
|
2020-01-08 11:02:10 -06:00
|
|
|
//~| ERROR: invalid `repr(align)` attribute: not a power of two
|
2019-05-27 00:35:48 -05:00
|
|
|
enum E1 { A, B }
|
|
|
|
|
|
|
|
#[repr(align(4294967296))] //~ ERROR: invalid `repr(align)` attribute: larger than 2^29
|
2020-01-08 11:02:10 -06:00
|
|
|
//~| ERROR: invalid `repr(align)` attribute: larger than 2^29
|
2019-05-27 00:35:48 -05:00
|
|
|
enum E2 { A, B }
|
|
|
|
|
|
|
|
#[repr(align(536870912))] // ok: this is the largest accepted alignment
|
|
|
|
enum E3 { A, B }
|
2019-01-31 07:18:31 -06:00
|
|
|
|
2017-01-14 16:49:29 -06:00
|
|
|
fn main() {}
|