Skip to content

Commit ca9322a

Browse files
Merge pull request #2003 from ZenithalHourlyRate:plaintext-backend-align
PiperOrigin-RevId: 783127413
2 parents a419347 + cc7d959 commit ca9322a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

tests/Examples/plaintext/roberts_cross/roberts_cross_mod_test.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ struct Memref1D roberts_cross(
1818

1919
void memrefCopy();
2020

21+
// Needs to be allocated in .bss
22+
// Maybe for alignment?
23+
// Otherwise segfault inside memrefCopy
24+
_Alignas(uint64_t) int64_t input[4096];
25+
2126
int main() {
22-
int64_t input[4096];
2327
int64_t expected[4096];
2428

2529
for (int i = 0; i < 4096; ++i) {

tests/Examples/plaintext/roberts_cross/roberts_cross_test.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ struct Memref1D roberts_cross(
1818

1919
void memrefCopy();
2020

21+
// Needs to be allocated in .bss
22+
// Maybe for alignment?
23+
// Otherwise segfault inside memrefCopy
24+
_Alignas(uint64_t) int16_t input[4096];
25+
2126
int main() {
22-
int16_t input[4096];
2327
int16_t expected[4096];
2428

2529
for (int i = 0; i < 4096; ++i) {

0 commit comments

Comments
 (0)