diff options
| author | grischka <grischka> | 2017-07-23 21:24:11 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2017-07-23 21:24:11 +0200 |
| commit | 4b3c6e74aba07d61e91b2e0ba7190483a0f9f000 (patch) | |
| tree | 8e91e83762d9c60dd81182b9d423f8addb3532f2 /tests/tests2/95_bitfields.c | |
| parent | fdc18d307aafce6e8833b0eb26c1313da88cfc9a (diff) | |
| download | tinycc-4b3c6e74aba07d61e91b2e0ba7190483a0f9f000.tar.gz tinycc-4b3c6e74aba07d61e91b2e0ba7190483a0f9f000.tar.bz2 | |
tccgen: nodata_wanted fix, default ONE_SOURCE, etc...
tccgen.c:
doubles need to be aligned, on ARM. The section_reserve()
in init_putv does not do that.
-D ONE_SOURCE: is now the default and not longer needed. Also,
tcc.h now sets the default native target. These both make
compiling tcc simple as "gcc tcc.c -o tcc -ldl" again.
arm-asm.c:
enable pseudo asm also for inline asm
tests/tests2/Makefile:
disable bitfield tests except on windows and x86_64
and don't generate-always
tcc.c:
fix a loop with -dt on errors
configure:
print compiler version (as recognized)
tccpp.c:
actually define symbols for tcc -dt
clear static variables (needed for -dt or libtcc usage)
96_nodata_wanted.c:
use __label__ instead of asm
lib/files:
use native symbols (__i386__ etc.) instead of TCC_TARGET_...
Diffstat (limited to 'tests/tests2/95_bitfields.c')
| -rw-r--r-- | tests/tests2/95_bitfields.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/tests2/95_bitfields.c b/tests/tests2/95_bitfields.c index 7edbeed..683becf 100644 --- a/tests/tests2/95_bitfields.c +++ b/tests/tests2/95_bitfields.c @@ -87,8 +87,10 @@ # define P #endif +printf("\n\n" + 2*top); #define TEST 1 #include SELF +top = 0; #define TEST 2 #include SELF #define TEST 3 @@ -99,7 +101,6 @@ #include SELF #define TEST 6 #include SELF -printf("\n\n"); #if PACK # pragma pack(pop) @@ -174,7 +175,7 @@ void dump(void *p, int s) #define TEST_STRUCT(v1,v2,v3,v4,v5) { \ struct __s _s, *s = & _s; \ - printf("---- TEST %d%s%s%s ----\n", \ + printf("\n---- TEST %d%s%s%s ----\n" + top, \ TEST, MS_BF?" - MS-BITFIELDS":"", \ PACK?" - PACKED":"", \ ALIGN?" - WITH ALIGN":""); \ @@ -184,7 +185,7 @@ void dump(void *p, int s) s->x = v1, s->y = v2, s->z = v3, s->a += v4, ++s->a, s->b = v5; \ printf("bits as set : "), dump(s, sizeof *s); \ printf("values :"), pv(x), pv(y), pv(z), pv(a), pv(b), printf("\n"); \ - printf("align/size : %d %d\n\n", alignof(struct __s),sizeof(struct __s)); \ + printf("align/size : %d %d\n", alignof(struct __s),sizeof(struct __s)); \ } #ifdef _MSC_VER @@ -203,6 +204,8 @@ void dump(void *p, int s) #define SELF "95_bitfields.c" +int top = 1; + int main() { #define MS_BF MS_BITFIELDS |
