| 1 | export fn entry() void { |
| 2 | testImplicitlyDecreaseFnAlign(alignedSmall, 1234); |
| 3 | } |
| 4 | fn testImplicitlyDecreaseFnAlign(ptr: *align(8) const fn () i32, answer: i32) void { |
| 5 | if (ptr() != answer) unreachable; |
| 6 | } |
| 7 | fn alignedSmall() align(4) i32 { |
| 8 | return 1234; |
| 9 | } |
| 10 | |
| 11 | // error |
| 12 | // target=x86_64-linux |
| 13 | // |
| 14 | // :2:35: error: expected type '*align(8) const fn () i32', found '*align(4) const fn () i32' |
| 15 | // :2:35: note: pointer alignment '4' cannot cast into pointer alignment '8' |