tinycc/tests
Michael Matz 605538f46d Fix sym_scope of typedefs
Sym.sym_scope and Sym.f (FuncAttr) share space, so blindly setting
one clobbers the other.  Right now this only leads to missing errors
on incompatible typedefs (see testcase), which this commit fixes.

But it points to a larger problem:
Generally we can only manipulate Sym.f for anonymous and field symbols,
not for anything that has a top-level name (basically any proper decl),
because the latter use sym_scope.  Luckily the functions type always
contains an anonymous symbol (in sym->type.ref), so we can use that.
But some of the functions attributes actually _do_ apply to the decl,
not the type (e.g. always_inline), so we still have a problem possibly,
when we update an pre-existing type that may already be shared with
another decl.

Would need untangling and perhaps using accessor functions that check
that Sym.f and Sym.sym_scope aren't used for the same symbol.
2023-02-22 17:59:31 +01:00
..
pp tccpp: Fix #ifdef in macro args 2022-08-16 15:59:41 +02:00
tests2 Fix sym_scope of typedefs 2023-02-22 17:59:31 +01:00
42test.h tccpp: Allow computed include like 42.h 2016-12-15 17:47:10 +01:00
abitest.c Spelling fixes 2017-09-24 18:03:26 -07:00
arm-asm-testsuite.sh arm-asm: Add vcvt 2021-02-13 01:03:41 +01:00
asm-c-connect-1.c OpenBSD: testcases 2020-12-16 17:52:59 +01:00
asm-c-connect-2.c OpenBSD: testcases 2020-12-16 17:52:59 +01:00
asmtest.S x86asm: Add lzcnt/tzcnt support 2022-12-13 11:34:54 +01:00
boundtest.c Serveral updates 2021-01-12 18:06:23 +01:00
bug.c Allow const expr in builtin_frame_address/builtin_return_address 2023-01-16 08:37:47 +01:00
gcctestsuite.sh gcctestsuite: Make the script usable on more systems, skip some tests 2022-10-12 00:59:02 +02:00
libtcc_test_mt.c Fix libtcc_test_mt 2022-12-04 11:55:06 +01:00
libtcc_test.c Add error_func and error_opaque getters to libtcc 2019-10-14 09:36:14 +02:00
Makefile Add dll support for macho 2022-12-16 20:57:45 +01:00
tcctest.c Add builtins ffs, clz, ctz, clrsb, popcount, parity 2022-12-11 08:23:22 +01:00
tcctest.h tccpp: Implement __BASE_FILE__ macro 2016-12-15 17:47:08 +01:00
testfp.c Remove misc. files 2016-10-01 20:27:41 +02:00
vla_test.c Improved variable length array support. 2013-04-27 22:58:52 +01:00