Selaa lähdekoodia

test folders

master
Nathan R 3 vuotta sitten
vanhempi
commit
bc394cc1d1
237 muutettua tiedostoa jossa 5990 lisäystä ja 0 poistoa
  1. +5
    -0
      tests-cpp/test88.c
  2. +7
    -0
      tests-err/test14.c
  3. +7
    -0
      tests-err/test14.out
  4. +20
    -0
      tests-err/test15.c
  5. +1
    -0
      tests-err/test15.out
  6. +12
    -0
      tests-err/test23.c
  7. +0
    -0
      tests-err/test23.out
  8. +6
    -0
      tests-err/test26.c
  9. +6
    -0
      tests-err/test26.out
  10. +14
    -0
      tests-err/test41.c
  11. +4
    -0
      tests-err/test41.out
  12. +15
    -0
      tests-err/test43.c
  13. +4
    -0
      tests-err/test43.out
  14. +12
    -0
      tests-err/test45.c
  15. +4
    -0
      tests-err/test45.out
  16. +18
    -0
      tests-err/test5.c
  17. +18
    -0
      tests-err/test5.out
  18. +6
    -0
      tests-err/test57.c
  19. +6
    -0
      tests-err/test57.out
  20. +4
    -0
      tests-err/test66.c
  21. +0
    -0
      tests-err/test66.out
  22. +6
    -0
      tests-err/test71.c
  23. +0
    -0
      tests-err/test71.out
  24. +19
    -0
      tests-gnu/test12.c
  25. +19
    -0
      tests-gnu/test12.out
  26. +8
    -0
      tests-gnu/test13.c
  27. +8
    -0
      tests-gnu/test13.out
  28. +7
    -0
      tests-gnu/test14.c
  29. +7
    -0
      tests-gnu/test14.out
  30. +5
    -0
      tests-gnu/test16.c
  31. +5
    -0
      tests-gnu/test16.out
  32. +11
    -0
      tests-gnu/test17.c
  33. +11
    -0
      tests-gnu/test17.out
  34. +7
    -0
      tests-gnu/test18.c
  35. +7
    -0
      tests-gnu/test18.out
  36. +15
    -0
      tests-gnu/test21.c
  37. +15
    -0
      tests-gnu/test21.out
  38. +23
    -0
      tests-gnu/test22.c
  39. +23
    -0
      tests-gnu/test22.out
  40. +17
    -0
      tests-gnu/test24.c
  41. +17
    -0
      tests-gnu/test24.out
  42. +77
    -0
      tests-gnu/test25.c
  43. +77
    -0
      tests-gnu/test25.out
  44. +3
    -0
      tests-gnu/test26.c
  45. +3
    -0
      tests-gnu/test26.out
  46. +30
    -0
      tests-gnu/test27.c
  47. +30
    -0
      tests-gnu/test27.out
  48. +8
    -0
      tests-gnu/test28.c
  49. +8
    -0
      tests-gnu/test28.out
  50. +23
    -0
      tests-gnu/test29.c
  51. +23
    -0
      tests-gnu/test29.out
  52. +46
    -0
      tests-gnu/test30.c
  53. +46
    -0
      tests-gnu/test30.out
  54. +39
    -0
      tests-gnu/test31.c
  55. +39
    -0
      tests-gnu/test31.out
  56. +18
    -0
      tests-gnu/test33.c
  57. +18
    -0
      tests-gnu/test33.out
  58. +18
    -0
      tests-gnu/test34.c
  59. +18
    -0
      tests-gnu/test34.out
  60. +7
    -0
      tests-gnu/test35.c
  61. +7
    -0
      tests-gnu/test35.out
  62. +3
    -0
      tests-gnu/test36.c
  63. +3
    -0
      tests-gnu/test36.out
  64. +10
    -0
      tests-gnu/test37.c
  65. +10
    -0
      tests-gnu/test37.out
  66. +17
    -0
      tests-gnu/test39.c
  67. +17
    -0
      tests-gnu/test39.out
  68. +21
    -0
      tests-gnu/test40.c
  69. +21
    -0
      tests-gnu/test40.out
  70. +4
    -0
      tests-gnu/test41.out
  71. +15
    -0
      tests-gnu/test43.out
  72. +4
    -0
      tests-gnu/test45.out
  73. +36
    -0
      tests-gnu/test52.c
  74. +36
    -0
      tests-gnu/test52.out
  75. +9
    -0
      tests-gnu/test53.c
  76. +9
    -0
      tests-gnu/test53.out
  77. +18
    -0
      tests-gnu/test54.c
  78. +18
    -0
      tests-gnu/test54.out
  79. +2
    -0
      tests-gnu/test56.c
  80. +2
    -0
      tests-gnu/test56.out
  81. +7
    -0
      tests-gnu/test58.c
  82. +7
    -0
      tests-gnu/test58.out
  83. +2
    -0
      tests-gnu/test59.out
  84. +3
    -0
      tests-gnu/test60.out
  85. +9
    -0
      tests-gnu/test61.c
  86. +9
    -0
      tests-gnu/test61.out
  87. +8
    -0
      tests-gnu/test62.c
  88. +8
    -0
      tests-gnu/test62.out
  89. +7
    -0
      tests-gnu/test63.c
  90. +7
    -0
      tests-gnu/test63.out
  91. +6
    -0
      tests-gnu/test64.c
  92. +6
    -0
      tests-gnu/test64.out
  93. +7
    -0
      tests-gnu/test65.c
  94. +7
    -0
      tests-gnu/test65.out
  95. +0
    -0
      tests-gnu/test66.out
  96. +11
    -0
      tests-gnu/test67.c
  97. +11
    -0
      tests-gnu/test67.out
  98. +6
    -0
      tests-gnu/test68.c
  99. +6
    -0
      tests-gnu/test68.out
  100. +5
    -0
      tests-gnu/test70.c

+ 5
- 0
tests-cpp/test88.c Näytä tiedosto

@ -0,0 +1,5 @@
# if boohoohoo
int x;
#else
int y;
#endif

+ 7
- 0
tests-err/test14.c Näytä tiedosto

@ -0,0 +1,7 @@
main() {
int a;
typedef b = (a);
typeof (int *) c;
typeof (d[0](1)) e;
c = &a;
}

+ 7
- 0
tests-err/test14.out Näytä tiedosto

@ -0,0 +1,7 @@
main() {
int a;
typedef b = (a);
typeof (int *) c;
typeof (d[0](1)) e;
c = &a;
}

+ 20
- 0
tests-err/test15.c Näytä tiedosto

@ -0,0 +1,20 @@
//generalized lvalues
foo() {
int a,b,f;
(a, b) += 5;
a, (b += 5);
&(a, b);
a, &b;
(a ? b : c) = 5 ;
(a ? b = 5 : (c = 5)) ;
(int)a = 5 ;
(int)(a = (char *)(int)5) ;
(int)a += 5;
(int)(a = (char *)(int) ((int)a + 5));
(int)f = 1;
(int *)&f;
}

+ 1
- 0
tests-err/test15.out Näytä tiedosto

@ -0,0 +1 @@
//generalized lvalues

+ 12
- 0
tests-err/test23.c Näytä tiedosto

@ -0,0 +1,12 @@
now() {
union foo { int i; double d; };
int x;
double y;
void hack (union foo);
union foo u;
u = (union foo) x == u.i = x;
u = (union foo) y == u.d = y;
hack ((union foo) x);
}

+ 0
- 0
tests-err/test23.out Näytä tiedosto


+ 6
- 0
tests-err/test26.c Näytä tiedosto

@ -0,0 +1,6 @@
func (x, y) {
int x, y;
return x+y;
}

+ 6
- 0
tests-err/test26.out Näytä tiedosto

@ -0,0 +1,6 @@
func (x, y) {
int x, y;
return x+y;
}

+ 14
- 0
tests-err/test41.c Näytä tiedosto

@ -0,0 +1,14 @@
int x;
int y;
test(){
switch (x) {
case 1: y=3;
break;
case 2: y=90;
break;
default:
}
}

+ 4
- 0
tests-err/test41.out Näytä tiedosto

@ -0,0 +1,4 @@
int x;
int y;

+ 15
- 0
tests-err/test43.c Näytä tiedosto

@ -0,0 +1,15 @@
int x;
int y;
test(){
if (x<10) {
goto l66;;
} else {
y=100;
y++;
l66:
}
}

+ 4
- 0
tests-err/test43.out Näytä tiedosto

@ -0,0 +1,4 @@
int x;
int y;

+ 12
- 0
tests-err/test45.c Näytä tiedosto

@ -0,0 +1,12 @@
typedef struct h765t_ h765t ;
struct h765t_ {
void *ll881ss[10];
};
void gg (h765t *q23w3)
{
if (q23w3->ll881ss[3]) {
if (1) {
q23w3->ll881ss[3] = (void *) (++(int)q23w3->ll881ss[3]);
}
}
}

+ 4
- 0
tests-err/test45.out Näytä tiedosto

@ -0,0 +1,4 @@
typedef struct h765t_ h765t ;
struct h765t_ {
void *ll881ss[10];
};

+ 18
- 0
tests-err/test5.c Näytä tiedosto

@ -0,0 +1,18 @@
typedef void *PyObject;
int
PyMapping_SetItemString(o, key, value)
PyObject *o;
char *key;
PyObject *value;
{
PyObject *okey;
int r;
if( ! key) return Py_ReturnNullError(),-1;
if (!(okey=PyString_FromString(key))) return -1;
r = PyObject_SetItem(o,okey,value);
if (--( okey )->ob_refcnt != 0) ; else (*( okey )->ob_type->tp_dealloc)((PyObject *)( okey )) ;
return r;
}

+ 18
- 0
tests-err/test5.out Näytä tiedosto

@ -0,0 +1,18 @@
typedef void *PyObject;
int
PyMapping_SetItemString(o, key, value)
PyObject *o;
char *key;
PyObject *value;
{
PyObject *okey;
int r;
if( ! key) return Py_ReturnNullError(),-1;
if (!(okey=PyString_FromString(key))) return -1;
r = PyObject_SetItem(o,okey,value);
if (--( okey )->ob_refcnt != 0) ; else (*( okey )->ob_type->tp_dealloc)((PyObject *)( okey )) ;
return r;
}

+ 6
- 0
tests-err/test57.c Näytä tiedosto

@ -0,0 +1,6 @@
void F(char l)
{
return l<= '\~';
}

+ 6
- 0
tests-err/test57.out Näytä tiedosto

@ -0,0 +1,6 @@
void F(char l)
{
return l<= '\~';
}

+ 4
- 0
tests-err/test66.c Näytä tiedosto

@ -0,0 +1,4 @@
f (__builtin_va_alist )
int __builtin_va_alist;...
{ }

+ 0
- 0
tests-err/test66.out Näytä tiedosto


+ 6
- 0
tests-err/test71.c Näytä tiedosto

@ -0,0 +1,6 @@
f (__builtin_va_alist )
int __builtin_va_alist;...
{
}

+ 0
- 0
tests-err/test71.out Näytä tiedosto


+ 19
- 0
tests-gnu/test12.c Näytä tiedosto

@ -0,0 +1,19 @@
int foo();
int abs;
int main() {
abs = ({
__label__ hey, now;
int y = foo ();
int z;
void *it;
it = &&hey;
hey: if (y > 0) z = y;
else z = - y;
z;
});
}

+ 19
- 0
tests-gnu/test12.out Näytä tiedosto

@ -0,0 +1,19 @@
int foo();
int abs;
int main() {
abs = ({
__label__ hey, now;
int y = foo ();
int z;
void *it;
it = &&hey;
hey: if (y > 0) z = y;
else z = - y;
z;
});
}

+ 8
- 0
tests-gnu/test13.c Näytä tiedosto

@ -0,0 +1,8 @@
foo (double a, double b)
{
auto double square (double z);
double square (double z) { return z * z; }
return square (a) + square (b);
}

+ 8
- 0
tests-gnu/test13.out Näytä tiedosto

@ -0,0 +1,8 @@
foo (double a, double b)
{
auto double square (double z);
double square (double z) { return z * z; }
return square (a) + square (b);
}

+ 7
- 0
tests-gnu/test14.c Näytä tiedosto

@ -0,0 +1,7 @@
main() {
int a;
//typedef b = (a);
typeof (int *) c;
typeof (d[0](1)) e;
c = &a;
}

+ 7
- 0
tests-gnu/test14.out Näytä tiedosto

@ -0,0 +1,7 @@
main() {
int a;
//typedef b = (a);
typeof (int *) c;
typeof (d[0](1)) e;
c = &a;
}

+ 5
- 0
tests-gnu/test16.c Näytä tiedosto

@ -0,0 +1,5 @@
hey() {
int x,y,z;
z= x ? : y;
}

+ 5
- 0
tests-gnu/test16.out Näytä tiedosto

@ -0,0 +1,5 @@
hey() {
int x,y,z;
z= x ? : y;
}

+ 11
- 0
tests-gnu/test17.c Näytä tiedosto

@ -0,0 +1,11 @@
heynow() {
long long int x = 10LL;
unsigned long long int y = 9ULL;
__complex__ float c, d, e;
float f;
c = 10.0 + 3.0fi;
d = ~ c;
f = __real__ c;
f = __imag__ d;
}

+ 11
- 0
tests-gnu/test17.out Näytä tiedosto

@ -0,0 +1,11 @@
heynow() {
long long int x = 10LL;
unsigned long long int y = 9ULL;
__complex__ float c, d, e;
float f;
c = 10.0 + 3.0fi;
d = ~ c;
f = __real__ c;
f = __imag__ d;
}

+ 7
- 0
tests-gnu/test18.c Näytä tiedosto

@ -0,0 +1,7 @@
concat_fopen (char *s1, char *s2, char *mode)
{
char str[strlen (s1) + strlen (s2) + 1];
strcpy (str, s1);
strcat (str, s2);
return fopen (str, mode);
}

+ 7
- 0
tests-gnu/test18.out Näytä tiedosto

@ -0,0 +1,7 @@
concat_fopen (char *s1, char *s2, char *mode)
{
char str[strlen (s1) + strlen (s2) + 1];
strcpy (str, s1);
strcat (str, s2);
return fopen (str, mode);
}

+ 15
- 0
tests-gnu/test21.c Näytä tiedosto

@ -0,0 +1,15 @@
heynow() {
struct foo {int a; char b[2];} structure;
char **foo1 = (char *[]) { "x", "y", "z" };
structure = ((struct foo) {x + y, 'a', 0});
{
struct foo temp = {x + y, 'a', 0};
structure = temp;
}
output = ((int[]) { 2, x, 28 }) [input];
}

+ 15
- 0
tests-gnu/test21.out Näytä tiedosto

@ -0,0 +1,15 @@
heynow() {
struct foo {int a; char b[2];} structure;
char **foo1 = (char *[]) { "x", "y", "z" };
structure = ((struct foo) {x + y, 'a', 0});
{
struct foo temp = {x + y, 'a', 0};
structure = temp;
}
output = ((int[]) { 2, x, 28 }) [input];
}

+ 23
- 0
tests-gnu/test22.c Näytä tiedosto

@ -0,0 +1,23 @@
aikoAllDay() {
int a[6] = { [4] 29, [2] = 15 };
int ab[6] = { 0, 0, 15, 0, 29, 0 };
int widths[] = { [0 ... 9] = 1, [10 ... 99] = 2, [100] = 3 };
int xvalue, yvalue, v1, v2, v4;
struct point { int x, y; };
struct point p = { xvalue, yvalue };
struct point p = { y: yvalue, x: xvalue };
struct point p = { .y = yvalue, .x = xvalue };
union foo { int i; double d; };
union foo f = { d: 4 };
int a[6] = { [1] = v1, v2, [4] = v4 };
int a[6] = { 0, v1, v2, 0, v4, 0 };
int whitespace[256]
= { [' '] = 1, ['\t'] = 1, ['\h'] = 1,
['\f'] = 1, ['\n'] = 1, ['\r'] = 1 };
fn(1,2,3);
}

+ 23
- 0
tests-gnu/test22.out Näytä tiedosto

@ -0,0 +1,23 @@
aikoAllDay() {
int a[6] = { [4] 29, [2] = 15 };
int ab[6] = { 0, 0, 15, 0, 29, 0 };
int widths[] = { [0 ... 9] = 1, [10 ... 99] = 2, [100] = 3 };
int xvalue, yvalue, v1, v2, v4;
struct point { int x, y; };
struct point p = { xvalue, yvalue };
struct point p = { y: yvalue, x: xvalue };
struct point p = { .y = yvalue, .x = xvalue };
union foo { int i; double d; };
union foo f = { d: 4 };
int a[6] = { [1] = v1, v2, [4] = v4 };
int a[6] = { 0, v1, v2, 0, v4, 0 };
int whitespace[256]
= { [' '] = 1, ['\t'] = 1, ['\h'] = 1,
['\f'] = 1, ['\n'] = 1, ['\r'] = 1 };
fn(1,2,3);
}

+ 17
- 0
tests-gnu/test24.c Näytä tiedosto

@ -0,0 +1,17 @@
struct foo {int a[5];} ;
struct foo f();
inline int bar (int index) {
int c;
enum blah;
c = __alignof(foo.a);
c = __alignof(unsigned long int);
switch (index) {
case 'a'...'z':
break;
}
return f().a[index];
}

+ 17
- 0
tests-gnu/test24.out Näytä tiedosto

@ -0,0 +1,17 @@
struct foo {int a[5];} ;
struct foo f();
inline int bar (int index) {
int c;
enum blah;
c = __alignof(foo.a);
c = __alignof(unsigned long int);
switch (index) {
case 'a'...'z':
break;
}
return f().a[index];
}

+ 77
- 0
tests-gnu/test25.c Näytä tiedosto

@ -0,0 +1,77 @@
void fatal () __attribute__ ((noreturn));
typedef void voidfn ();
volatile voidfn fatal;
int square (int) __attribute__ ((const));
typedef int intfn ();
extern const intfn square;
extern int
my_printf (void *my_object, const char *my_format, ...)
__attribute__ ((format (printf, 2, 3)));
extern char *
my_dgettext (char *my_domain, const char *my_format)
__attribute__ ((format_arg (2)));
extern void foobar (void) __attribute__ ((section ("bar")));
void __f () { /* do something */; }
void f () __attribute__ ((weak, alias ("__f")));
int x __attribute__ ((aligned (16), packed)) = 0;
struct foo { int x[2] __attribute__ ((aligned (8))); };
short array[3] __attribute__ ((aligned));
struct foo1
{
char a;
int x[2] __attribute__ ((packed));
};
struct duart a __attribute__ ((section ("DUART_A"))) = { 0 };
struct duart b __attribute__ ((section ("DUART_B"))) = { 0 };
char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };
int init_data __attribute__ ((section ("INITDATA"))) = 0;
struct S { short f[3]; } __attribute__ ((aligned (8)));
typedef int more_aligned_int __attribute__ ((aligned (8)));
union wait { int a, __ip; };
typedef int pid_t;
typedef union
{
int *__ip;
union wait *__up;
} wait_status_ptr_t __attribute__ ((__transparent_union__));
pid_t wait (wait_status_ptr_t);
int w1 () { int w; return wait (&w); }
int w2 () { union wait w; return wait (&w); }
pid_t wait (wait_status_ptr_t p)
{
return waitpid (-1, p.__ip, 0);
}
main()
{
/* Initialize stack pointer */
init_sp (stack + sizeof (stack));
/* Initialize initialized data */
memcpy (&init_data, &data, &edata - &data);
/* Turn on the serial ports */
init_duart (&a);
init_duart (&b);
}

+ 77
- 0
tests-gnu/test25.out Näytä tiedosto

@ -0,0 +1,77 @@
void fatal () __attribute__ ((noreturn));
typedef void voidfn ();
volatile voidfn fatal;
int square (int) __attribute__ ((const));
typedef int intfn ();
extern const intfn square;
extern int
my_printf (void *my_object, const char *my_format, ...)
__attribute__ ((format (printf, 2, 3)));
extern char *
my_dgettext (char *my_domain, const char *my_format)
__attribute__ ((format_arg (2)));
extern void foobar (void) __attribute__ ((section ("bar")));
void __f () { /* do something */; }
void f () __attribute__ ((weak, alias ("__f")));
int x __attribute__ ((aligned (16), packed)) = 0;
struct foo { int x[2] __attribute__ ((aligned (8))); };
short array[3] __attribute__ ((aligned));
struct foo1
{
char a;
int x[2] __attribute__ ((packed));
};
struct duart a __attribute__ ((section ("DUART_A"))) = { 0 };
struct duart b __attribute__ ((section ("DUART_B"))) = { 0 };
char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };
int init_data __attribute__ ((section ("INITDATA"))) = 0;
struct S { short f[3]; } __attribute__ ((aligned (8)));
typedef int more_aligned_int __attribute__ ((aligned (8)));
union wait { int a, __ip; };
typedef int pid_t;
typedef union
{
int *__ip;
union wait *__up;
} wait_status_ptr_t __attribute__ ((__transparent_union__));
pid_t wait (wait_status_ptr_t);
int w1 () { int w; return wait (&w); }
int w2 () { union wait w; return wait (&w); }
pid_t wait (wait_status_ptr_t p)
{
return waitpid (-1, p.__ip, 0);
}
main()
{
/* Initialize stack pointer */
init_sp (stack + sizeof (stack));
/* Initialize initialized data */
memcpy (&init_data, &data, &edata - &data);
/* Turn on the serial ports */
init_duart (&a);
init_duart (&b);
}

+ 3
- 0
tests-gnu/test26.c Näytä tiedosto

@ -0,0 +1,3 @@
int foo asm ("myfoo") = 2;
extern func () asm ("FUNC");

+ 3
- 0
tests-gnu/test26.out Näytä tiedosto

@ -0,0 +1,3 @@
int foo asm ("myfoo") = 2;
extern func () asm ("FUNC");

+ 30
- 0
tests-gnu/test27.c Näytä tiedosto

@ -0,0 +1,30 @@
fn() {
asm ("fsinx %1,%0" : "=f" (result) : "f" (angle));
asm ("combine %2,%0" : "=r" (foo) : "0" (foo), "g" (bar));
asm ("combine %2,%0" : "=r" (foo) : "r" (foo), "g" (bar));
asm volatile ("movc3 %0,%1,%2"
: /* no outputs */
: "g" (from), "g" (to), "g" (count)
: "r0", "r1", "r2", "r3", "r4", "r5");
asm ("movl %0,r9;movl %1,r10;call _foo"
: /* no outputs */
: "g" (from), "g" (to)
: "r9", "r10");
asm ("clr %0;frob %1;beq 0f;mov #1,%0;0:"
: "g" (result)
: "g" (input));
{ double __value, __arg = (x);
asm ("fsinx %1,%0": "=f" (__value): "f" (__arg));
__value; }
{ int __old;
asm volatile ("get_and_set_priority %0, %1": "=g" (__old) : "g" (new));
__old; }
}

+ 30
- 0
tests-gnu/test27.out Näytä tiedosto

@ -0,0 +1,30 @@
fn() {
asm ("fsinx %1,%0" : "=f" (result) : "f" (angle));
asm ("combine %2,%0" : "=r" (foo) : "0" (foo), "g" (bar));
asm ("combine %2,%0" : "=r" (foo) : "r" (foo), "g" (bar));
asm volatile ("movc3 %0,%1,%2"
: /* no outputs */
: "g" (from), "g" (to), "g" (count)
: "r0", "r1", "r2", "r3", "r4", "r5");
asm ("movl %0,r9;movl %1,r10;call _foo"
: /* no outputs */
: "g" (from), "g" (to)
: "r9", "r10");
asm ("clr %0;frob %1;beq 0f;mov #1,%0;0:"
: "g" (result)
: "g" (input));
{ double __value, __arg = (x);
asm ("fsinx %1,%0": "=f" (__value): "f" (__arg));
__value; }
{ int __old;
asm volatile ("get_and_set_priority %0, %1": "=g" (__old) : "g" (new));
__old; }
}

+ 8
- 0
tests-gnu/test28.c Näytä tiedosto

@ -0,0 +1,8 @@
// C++ comment
int f$;
tester (int len; char data[len][len], int len) {
}

+ 8
- 0
tests-gnu/test28.out Näytä tiedosto

@ -0,0 +1,8 @@
// C++ comment
int f$;
tester (int len; char data[len][len], int len) {
}

+ 23
- 0
tests-gnu/test29.c Näytä tiedosto

@ -0,0 +1,23 @@
typedef struct a {
int b;
} c,*d;
extern int execv(const char *, char *const []);
int b;
int a = b = 1;
static char *predefs = "whatever \
more ";
char *temporary_firstobj =
(char *) __extension__
({ struct obstack *__h = ( &temporary_obstack );
__extension__ ({ struct obstack *__o = ( __h );
int __len = ( ( 0 ) );
if (__o->chunk_limit - __o->next_free < __len) _obstack_newchunk (__o, __len); __o->next_free += __len; (void) 0; }) ; __extension__ ({ struct obstack *__o1 = ( __h ); void *value; value = (void *) __o1->object_base; if (__o1->next_free == value) __o1->maybe_empty_object = 1; __o1->next_free = (( ((( __o1->next_free ) - (char *) 0) +__o1->alignment_mask) & ~ (__o1->alignment_mask) ) + (char *) 0) ; if (__o1->next_free - (char *)__o1->chunk > __o1->chunk_limit - (char *)__o1->chunk) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; value; }) ; }) ;
static char cPickle_module_documentation[] =
"C implementation and optimization of the Python pickle module\n"
"\n"
"cPickle.c,v 1.48 1997/12/07 14:37:39 jim Exp\n"
;

+ 23
- 0
tests-gnu/test29.out Näytä tiedosto

@ -0,0 +1,23 @@
typedef struct a {
int b;
} c,*d;
extern int execv(const char *, char *const []);
int b;
int a = b = 1;
static char *predefs = "whatever \
more ";
char *temporary_firstobj =
(char *) __extension__
({ struct obstack *__h = ( &temporary_obstack );
__extension__ ({ struct obstack *__o = ( __h );
int __len = ( ( 0 ) );
if (__o->chunk_limit - __o->next_free < __len) _obstack_newchunk (__o, __len); __o->next_free += __len; (void) 0; }) ; __extension__ ({ struct obstack *__o1 = ( __h ); void *value; value = (void *) __o1->object_base; if (__o1->next_free == value) __o1->maybe_empty_object = 1; __o1->next_free = (( ((( __o1->next_free ) - (char *) 0) +__o1->alignment_mask) & ~ (__o1->alignment_mask) ) + (char *) 0) ; if (__o1->next_free - (char *)__o1->chunk > __o1->chunk_limit - (char *)__o1->chunk) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; value; }) ; }) ;
static char cPickle_module_documentation[] =
"C implementation and optimization of the Python pickle module\n"
"\n"
"cPickle.c,v 1.48 1997/12/07 14:37:39 jim Exp\n"
;

+ 46
- 0
tests-gnu/test30.c Näytä tiedosto

@ -0,0 +1,46 @@
typedef struct bitmap_element_def
{
struct bitmap_element_def *next;
struct bitmap_element_def *prev;
unsigned int indx;
unsigned int bits[2 ];
} bitmap_element;
typedef struct bitmap_head_def {
bitmap_element *first;
bitmap_element *current;
int indx;
} bitmap_head, *bitmap;
static __inline__ void
bitmap_element_free (head, elt)
bitmap head;
bitmap_element *elt;
{
bitmap_element *next = elt->next;
}
main() {
/* See if this is a branch that is part of the path. If so, and it is
to be taken, do so. */
if (next_branch->branch == insn)
{
enum taken status = next_branch++->status;
if (status != NOT_TAKEN)
{
if (status == TAKEN)
record_jump_equiv (insn, 1);
else
invalidate_skipped_block (NEXT_INSN (insn));
/* Set the last insn as the jump insn; it doesn't affect cc0.
Then follow this branch. */
prev_insn_cc0 = 0;
prev_insn = insn;
insn = JUMP_LABEL (insn);
continue;
}
}
}

+ 46
- 0
tests-gnu/test30.out Näytä tiedosto

@ -0,0 +1,46 @@
typedef struct bitmap_element_def
{
struct bitmap_element_def *next;
struct bitmap_element_def *prev;
unsigned int indx;
unsigned int bits[2 ];
} bitmap_element;
typedef struct bitmap_head_def {
bitmap_element *first;
bitmap_element *current;
int indx;
} bitmap_head, *bitmap;
static __inline__ void
bitmap_element_free (head, elt)
bitmap head;
bitmap_element *elt;
{
bitmap_element *next = elt->next;
}
main() {
/* See if this is a branch that is part of the path. If so, and it is
to be taken, do so. */
if (next_branch->branch == insn)
{
enum taken status = next_branch++->status;
if (status != NOT_TAKEN)
{
if (status == TAKEN)
record_jump_equiv (insn, 1);
else
invalidate_skipped_block (NEXT_INSN (insn));
/* Set the last insn as the jump insn; it doesn't affect cc0.
Then follow this branch. */
prev_insn_cc0 = 0;
prev_insn = insn;
insn = JUMP_LABEL (insn);
continue;
}
}
}

+ 39
- 0
tests-gnu/test31.c Näytä tiedosto

@ -0,0 +1,39 @@
typedef struct ppptype_ {
void *d;
void *l;
int t;
int m;
} ppptype;
typedef struct jjjtype_ jjjtype ;
typedef __typeof__ (sizeof (0)) size_t;
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned long ulong;
typedef ulong cttype;
typedef char *zz_list;
typedef int boolean;
typedef unsigned char tl;
typedef void abctype;
typedef int wwd_t;
typedef enum {
F_FE,
F_U,
F_E,
} yy;
typedef void xyz;
typedef xyz (xyz_t)(void);
typedef abctype (abcproc)(void );
typedef boolean (mnsss)(ppptype *);
typedef void (void_r)(void *, ...);
typedef boolean (boolean_e)(void *, ...);
typedef void (*tyyx_func)(void *, void *, void *);
typedef boolean (*bbhg_type)(jjjtype *);
typedef struct cl_ {
union {
uchar y[4];
ushort s[2];
ulong d;
} d;
} cl;

+ 39
- 0
tests-gnu/test31.out Näytä tiedosto

@ -0,0 +1,39 @@
typedef struct ppptype_ {
void *d;
void *l;
int t;
int m;
} ppptype;
typedef struct jjjtype_ jjjtype ;
typedef __typeof__ (sizeof (0)) size_t;
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned long ulong;
typedef ulong cttype;
typedef char *zz_list;
typedef int boolean;
typedef unsigned char tl;
typedef void abctype;
typedef int wwd_t;
typedef enum {
F_FE,
F_U,
F_E,
} yy;
typedef void xyz;
typedef xyz (xyz_t)(void);
typedef abctype (abcproc)(void );
typedef boolean (mnsss)(ppptype *);
typedef void (void_r)(void *, ...);
typedef boolean (boolean_e)(void *, ...);
typedef void (*tyyx_func)(void *, void *, void *);
typedef boolean (*bbhg_type)(jjjtype *);
typedef struct cl_ {
union {
uchar y[4];
ushort s[2];
ulong d;
} d;
} cl;

+ 18
- 0
tests-gnu/test33.c Näytä tiedosto

@ -0,0 +1,18 @@
static inline void
ttt (int *wwp)
{
int xyz = 6;
do {
asm(".set noreorder; \
lqq %7,5(%8); \
nop; \
ziv %2,%2,-4; \
1:\
ab %5,7(%1);\
.set reorder"
: "=r" (xyz)
: "r" (wwp), "0" (xyz));
} while (!xyz);
}

+ 18
- 0
tests-gnu/test33.out Näytä tiedosto

@ -0,0 +1,18 @@
static inline void
ttt (int *wwp)
{
int xyz = 6;
do {
asm(".set noreorder; \
lqq %7,5(%8); \
nop; \
ziv %2,%2,-4; \
1:\
ab %5,7(%1);\
.set reorder"
: "=r" (xyz)
: "r" (wwp), "0" (xyz));
} while (!xyz);
}

+ 18
- 0
tests-gnu/test34.c Näytä tiedosto

@ -0,0 +1,18 @@
static inline void
junk2 (void)
{
long gtexews;
asm volatile (".set noreorder");
asm volatile ("awde0 %8,$42" : "=r" (gtexews) : );
asm volatile ("nop");
asm volatile ("tref %7,$12" : : "r" (gtexews & ~0x00001111 )
);
asm volatile ("nop");
asm volatile (".set reorder");
asm volatile (".set mips3");
asm volatile (".set noreorder\n"
".set noat\n"
".set mips3");
asm volatile ("yha0 $7 ,$29");
}

+ 18
- 0
tests-gnu/test34.out Näytä tiedosto

@ -0,0 +1,18 @@
static inline void
junk2 (void)
{
long gtexews;
asm volatile (".set noreorder");
asm volatile ("awde0 %8,$42" : "=r" (gtexews) : );
asm volatile ("nop");
asm volatile ("tref %7,$12" : : "r" (gtexews & ~0x00001111 )
);
asm volatile ("nop");
asm volatile (".set reorder");
asm volatile (".set mips3");
asm volatile (".set noreorder\n"
".set noat\n"
".set mips3");
asm volatile ("yha0 $7 ,$29");
}

+ 7
- 0
tests-gnu/test35.c Näytä tiedosto

@ -0,0 +1,7 @@
typedef struct d4elhhtrt_ {
int alhhtrt : 6;
int bblhhtrt : 6;
int uyttffds:3 __attribute__ ((packed)) ;
int hfgeresshb:5 __attribute__ ((packed)) ;
} d4elhhtrt;

+ 7
- 0
tests-gnu/test35.out Näytä tiedosto

@ -0,0 +1,7 @@
typedef struct d4elhhtrt_ {
int alhhtrt : 6;
int bblhhtrt : 6;
int uyttffds:3 __attribute__ ((packed)) ;
int hfgeresshb:5 __attribute__ ((packed)) ;
} d4elhhtrt;

+ 3
- 0
tests-gnu/test36.c Näytä tiedosto

@ -0,0 +1,3 @@
typedef struct {
} ff6tfdrg;

+ 3
- 0
tests-gnu/test36.out Näytä tiedosto

@ -0,0 +1,3 @@
typedef struct {
} ff6tfdrg;

+ 10
- 0
tests-gnu/test37.c Näytä tiedosto

@ -0,0 +1,10 @@
enum { DDD = -7 };
struct abc_ {
struct abc *next;
enum { DDD = -7 };
int a;
char b;
};

+ 10
- 0
tests-gnu/test37.out Näytä tiedosto

@ -0,0 +1,10 @@
enum { DDD = -7 };
struct abc_ {
struct abc *next;
enum { DDD = -7 };
int a;
char b;
};

+ 17
- 0
tests-gnu/test39.c Näytä tiedosto

@ -0,0 +1,17 @@
typedef struct x_ x;
struct x_{
int y;
int z;
};
x b;
struct x_ a = {};
x c = {};
typedef struct xyz_ {
int a;
int b;;
char c;
} xyz;

+ 17
- 0
tests-gnu/test39.out Näytä tiedosto

@ -0,0 +1,17 @@
typedef struct x_ x;
struct x_{
int y;
int z;
};
x b;
struct x_ a = {};
x c = {};
typedef struct xyz_ {
int a;
int b;;
char c;
} xyz;

+ 21
- 0
tests-gnu/test40.c Näytä tiedosto

@ -0,0 +1,21 @@
typedef int tt67t __attribute__ ((mode (SI)));
typedef unsigned int hg554x __attribute__ ((mode (SI)));
typedef int u887 __attribute__ ((mode (DI)));
struct lo98k {tt67t d453s, s7655fd4;};
typedef union
{
struct lo98k s;
u887 s432;
} c443ds4;
u887
test (u887 e9877, u887 q3209)
{
c443ds4 w;
c443ds4 e45d45, o908oo98;
e45d45.s432 = e9877,
o908oo98.s432 = q3209;
w.s432 = ({c443ds4 y665re; __asm__ ("trt %1,%9\
gtri %6" : "=d" ((hg554x)( y665re.s.s7655fd4 )), "=d" ((hg554x)( y665re.s.d453s )) : "d" ((hg554x)( e45d45.s.s7655fd4 )), "d" ((hg554x)( o908oo98.s.s7655fd4 ))) ; y665re.s432; }) ;
return w.s432;
}

+ 21
- 0
tests-gnu/test40.out Näytä tiedosto

@ -0,0 +1,21 @@
typedef int tt67t __attribute__ ((mode (SI)));
typedef unsigned int hg554x __attribute__ ((mode (SI)));
typedef int u887 __attribute__ ((mode (DI)));
struct lo98k {tt67t d453s, s7655fd4;};
typedef union
{
struct lo98k s;
u887 s432;
} c443ds4;
u887
test (u887 e9877, u887 q3209)
{
c443ds4 w;
c443ds4 e45d45, o908oo98;
e45d45.s432 = e9877,
o908oo98.s432 = q3209;
w.s432 = ({c443ds4 y665re; __asm__ ("trt %1,%9\
gtri %6" : "=d" ((hg554x)( y665re.s.s7655fd4 )), "=d" ((hg554x)( y665re.s.d453s )) : "d" ((hg554x)( e45d45.s.s7655fd4 )), "d" ((hg554x)( o908oo98.s.s7655fd4 ))) ; y665re.s432; }) ;
return w.s432;
}

+ 4
- 0
tests-gnu/test41.out Näytä tiedosto

@ -0,0 +1,4 @@
int x;
int y;

+ 15
- 0
tests-gnu/test43.out Näytä tiedosto

@ -0,0 +1,15 @@
int x;
int y;
test(){
if (x<10) {
goto l66;;
} else {
y=100;
y++;
l66:
}
}

+ 4
- 0
tests-gnu/test45.out Näytä tiedosto

@ -0,0 +1,4 @@
typedef struct h765t_ h765t ;
struct h765t_ {
void *ll881ss[10];
};

+ 36
- 0
tests-gnu/test52.c Näytä tiedosto

@ -0,0 +1,36 @@
funfn(int a, int b, int c, int d, char *e)
{
if (a) {
print();
return b;
}
if (b) {
int localfn() {
return a;
}
exit(c);
}
if (d) {
__builtin_return( null );
}
return c;
}
fn() {
print("whoa");
}
fn2() {
if (1)
return 2;
}
main() {
malloc(10);
nonMalloc(20);
fn();
funfn(1,2,3,4,"hey");
}

+ 36
- 0
tests-gnu/test52.out Näytä tiedosto

@ -0,0 +1,36 @@
funfn(int a, int b, int c, int d, char *e)
{
if (a) {
print();
return b;
}
if (b) {
int localfn() {
return a;
}
exit(c);
}
if (d) {
__builtin_return( null );
}
return c;
}
fn() {
print("whoa");
}
fn2() {
if (1)
return 2;
}
main() {
malloc(10);
nonMalloc(20);
fn();
funfn(1,2,3,4,"hey");
}

+ 9
- 0
tests-gnu/test53.c Näytä tiedosto

@ -0,0 +1,9 @@
void * validate_malloc(typeof(sizeof(0)) size, void *pc);
void * get_current_pc(void);
void fn_entry(int functionId);
void fn_exit(int functionId);
main() {
exit(0);
}

+ 9
- 0
tests-gnu/test53.out Näytä tiedosto

@ -0,0 +1,9 @@
void * validate_malloc(typeof(sizeof(0)) size, void *pc);
void * get_current_pc(void);
void fn_entry(int functionId);
void fn_exit(int functionId);
main() {
exit(0);
}

+ 18
- 0
tests-gnu/test54.c Näytä tiedosto

@ -0,0 +1,18 @@
extern void rt(long, long);
extern long rn(void);
extern void rl(char*, int, int);
int rd (void **, int) ;
rf (int *rnx)
{
return (rnx);
}
rnn (int rny)
{
return (rny);
}
;
;
extern const int XYZ ; ;
;

+ 18
- 0
tests-gnu/test54.out Näytä tiedosto

@ -0,0 +1,18 @@
extern void rt(long, long);
extern long rn(void);
extern void rl(char*, int, int);
int rd (void **, int) ;
rf (int *rnx)
{
return (rnx);
}
rnn (int rny)
{
return (rny);
}
;
;
extern const int XYZ ; ;
;

+ 2
- 0
tests-gnu/test56.c Näytä tiedosto

@ -0,0 +1,2 @@
cat = 13;

+ 2
- 0
tests-gnu/test56.out Näytä tiedosto

@ -0,0 +1,2 @@
cat = 13;

+ 7
- 0
tests-gnu/test58.c Näytä tiedosto

@ -0,0 +1,7 @@
g ();
f ()
{
int seed;
g (seed);
}

+ 7
- 0
tests-gnu/test58.out Näytä tiedosto

@ -0,0 +1,7 @@
g ();
f ()
{
int seed;
g (seed);
}

+ 2
- 0
tests-gnu/test59.out Näytä tiedosto

@ -0,0 +1,2 @@
typedef long time_t;

+ 3
- 0
tests-gnu/test60.out Näytä tiedosto

@ -0,0 +1,3 @@
//long int s[5] = L"abcd";
char *s = L"abcd";

+ 9
- 0
tests-gnu/test61.c Näytä tiedosto

@ -0,0 +1,9 @@
struct s
{
int a;
int b;
short c;
int d[3];
};
struct s s = { .b = 3, .d = {2,0,0} };

+ 9
- 0
tests-gnu/test61.out Näytä tiedosto

@ -0,0 +1,9 @@
struct s
{
int a;
int b;
short c;
int d[3];
};
struct s s = { .b = 3, .d = {2,0,0} };

+ 8
- 0
tests-gnu/test62.c Näytä tiedosto

@ -0,0 +1,8 @@
struct s {
int c[3];
};
struct s s = {
c: {1, 2, 3}
};

+ 8
- 0
tests-gnu/test62.out Näytä tiedosto

@ -0,0 +1,8 @@
struct s {
int c[3];
};
struct s s = {
c: {1, 2, 3}
};

+ 7
- 0
tests-gnu/test63.c Näytä tiedosto

@ -0,0 +1,7 @@
x(a)
{
static void*j[]={&&l1};
goto*j[a];
l1:;
}

+ 7
- 0
tests-gnu/test63.out Näytä tiedosto

@ -0,0 +1,7 @@
x(a)
{
static void*j[]={&&l1};
goto*j[a];
l1:;
}

+ 6
- 0
tests-gnu/test64.c Näytä tiedosto

@ -0,0 +1,6 @@
f()
{
__label__ l;
l:p();
}

+ 6
- 0
tests-gnu/test64.out Näytä tiedosto

@ -0,0 +1,6 @@
f()
{
__label__ l;
l:p();
}

+ 7
- 0
tests-gnu/test65.c Näytä tiedosto

@ -0,0 +1,7 @@
f()
{
__label__ mylabel;
mylabel:
goto mylabel;
}

+ 7
- 0
tests-gnu/test65.out Näytä tiedosto

@ -0,0 +1,7 @@
f()
{
__label__ mylabel;
mylabel:
goto mylabel;
}

+ 0
- 0
tests-gnu/test66.out Näytä tiedosto


+ 11
- 0
tests-gnu/test67.c Näytä tiedosto

@ -0,0 +1,11 @@
f ()
{
__label__ l;
void *x()
{
return &&l;
}
l:;
}

+ 11
- 0
tests-gnu/test67.out Näytä tiedosto

@ -0,0 +1,11 @@
f ()
{
__label__ l;
void *x()
{
return &&l;
}
l:;
}

+ 6
- 0
tests-gnu/test68.c Näytä tiedosto

@ -0,0 +1,6 @@
struct s
{
int b;
};
struct s s = { .b = 3 };

+ 6
- 0
tests-gnu/test68.out Näytä tiedosto

@ -0,0 +1,6 @@
struct s
{
int b;
};
struct s s = { .b = 3 };

+ 5
- 0
tests-gnu/test70.c Näytä tiedosto

@ -0,0 +1,5 @@
f()
{
if (!('\400'));
}

Some files were not shown because too many files changed in this diff

Ladataan…
Peruuta
Tallenna