add clang
This commit is contained in:
parent
4715742aa8
commit
9a4b261179
890 changed files with 229323 additions and 20 deletions
24
05/tcc-final/tests/tests2/109_float_struct_calling.c
Normal file
24
05/tcc-final/tests/tests2/109_float_struct_calling.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include <stdio.h>
|
||||
|
||||
/* This test used to fail on x86_64 on linux with sse registers */
|
||||
|
||||
struct Point {
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
||||
struct Rect {
|
||||
struct Point top_left;
|
||||
struct Point size;
|
||||
};
|
||||
|
||||
float foo(struct Point p, struct Rect r) {
|
||||
return r.size.x;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
struct Point p = {1, 2};
|
||||
struct Rect r = {{3, 4}, {5, 6}};
|
||||
printf("%f\n", foo(p, r));
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue