Skip to content

Commit

Permalink
test: Add test for external and weak linakge of global variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jezurko authored and xlauko committed Oct 7, 2024
1 parent 0a01243 commit 843fbb6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/vast/Dialect/HighLevel/glob-linkage-a.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// RUN: %vast-front %s -vast-emit-mlir=hl -o - | %file-check %s
//
// CHECK: hl.var @ew, <extern_weak>
extern int __attribute__((weak)) ew;
// CHECK: hl.var @wundef, <weak>
int __attribute__((weak)) wundef;
// CHECK: hl.var @wdef, <weak>
int __attribute__((weak)) wdef = 5;
// CHECK: hl.var @ewdef, <weak>
extern int __attribute__((weak)) ewdef = 5;
// CHECK: hl.var @edef, <external>
extern int edef = 5;
// CHECK: hl.var @undef, <common>
int undef;
// CHECK: hl.var @def, <external>
int def = 5;

0 comments on commit 843fbb6

Please sign in to comment.