Commit 2675d6e7 authored by Sergio Costas's avatar Sergio Costas

Added forgoten .c files for tests

parent e5d4503a
typedef __crust_t__ unsigned char *crust_t;
#define NULL ((void *)0)
crust_t main(crust_t __crust_recycle__ param) {
crust_t var2 = (crust_t) 5;
crust_t var3;
var3 = main(var2); // This is legal
__crust_debug__
}
typedef __crust_t__ unsigned char *crust_t;
#define NULL ((void *)0)
void main(crust_t __crust_borrow__ param) {
crust_t var2 = (crust_t) 5;
main(var2); // This is legal
__crust_debug__
}
typedef __crust_t__ unsigned char *crust_t;
#define NULL ((void *)0)
void main(crust_t __crust_borrow__ param) {
crust_t var2 = NULL;
main(var2); // This is legal
__crust_debug__
}
typedef __crust_t__ unsigned char *crust_t;
#define NULL ((void *)0)
void test_function(crust_t param) {
}
void main(crust_t __crust_borrow__ param) {
test_function(param); // ERROR: can't pass a borrowed variable as a non-borrow parameter
}
typedef __crust_t__ unsigned char *crust_t;
#define NULL ((void *)0)
void test_function(crust_t __crust_borrow__ param) {
}
void main(crust_t __crust_borrow__ param) {
test_function(param); // This is legal
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment