[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Initialiser overflow bug
From: |
Elijah Stone |
Subject: |
[Tinycc-devel] Initialiser overflow bug |
Date: |
Thu, 10 Mar 2022 10:27:25 -0800 (PST) |
Hi,
The following code results in an initialiser overflow ICE on the latest
version of tcc (917aad3), amd64 linux.
#include <stdlib.h>
#include <string.h>
typedef struct { char b[2]; } Barb;
Barb *f(Barb x, Barb y) {
return memcpy(malloc(2*sizeof(Barb)), &(Barb[]){x,y}, 2*sizeof(Barb));
}
Note: if I declare char b[1] in Barb, there is no error; but the error
occurs on any larger size.
-E
- [Tinycc-devel] Initialiser overflow bug,
Elijah Stone <=