add clang
This commit is contained in:
parent
4715742aa8
commit
9a4b261179
890 changed files with 229323 additions and 20 deletions
41
05/tcc-final/tests/bug.c
Normal file
41
05/tcc-final/tests/bug.c
Normal file
|
@ -0,0 +1,41 @@
|
|||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
int compile_errors(void)
|
||||
{
|
||||
#if TEST == 1
|
||||
{
|
||||
/* Not constant */
|
||||
static int i = (&"Foobar"[1] - &"Foobar"[0]);
|
||||
}
|
||||
#endif
|
||||
#if TEST == 2
|
||||
{
|
||||
/* Not constant */
|
||||
struct{int c;}v;
|
||||
static long i=((char*)&(v.c)-(char*)&v);
|
||||
}
|
||||
#endif
|
||||
#if TEST == 3
|
||||
{
|
||||
/* Not constant */
|
||||
static const short ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
|
||||
void *p = &&l1 + ar[0];
|
||||
goto *p;
|
||||
l1: return 1;
|
||||
l2: return 2;
|
||||
}
|
||||
#endif
|
||||
#if TEST == 4
|
||||
{
|
||||
/* Only integer allowed */
|
||||
__builtin_return_address(0 + 1) != NULL;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue