Reproducer:
$ cat new.c # can be found in attachment
void abort(void);
int ii;
typedef struct {
} raw_spinlock_t;
typedef struct {
raw_spinlock_t raw_lock;
} spinlock_t;
raw_spinlock_t one_raw_spinlock(void) {
raw_spinlock_t raw_lock;
ii++;
return raw_lock;
}
int main(void) {
spinlock_t lock =
(spinlock_t){.raw_lock = one_raw_spinlock()};
int ctf0_idx;
ctf0_idx = (int)0x00000000;
int ctf0_constval;
ctf0_constval = (int)0x00000000;
int *ctf0_arr[] = {&ctf0_constval};
int ctf1_idx;
ctf1_idx = (int)0x00000000;
int ctf1_constval;
ctf1_constval = (int)0x00000000;
int *ctf1_arr[] = {&ctf1_constval};
if (((*ctf0_arr[ctf0_idx]) | (*ctf1_arr[ctf1_idx])) != 1)
abort();
return 0;
}
$ tcc -O0 new.ctcc: x86_64-gen.c:441: load: Assertion `((ft & VT_BTYPE) ==
VT_INT) || ((ft & VT_BTYPE) == VT_LLONG) || ((ft & VT_BTYPE) == VT_PTR)
|| ((ft & VT_BTYPE) == VT_FUNC)' failed.
[1] 115530 abort (core dumped) tcc -O0 new.c
my tcc version is (ubuntu 18.04)
$ tcc -v
tcc version 0.9.27 (x86_64 Linux)
new.c
Description: Binary data
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
