+++ /dev/null
-#include <stdio.h>
-
-extern int table[];
-
-int main() {
- printf("%d %d %d %d\n", table[0], table[1], table[2], table[3]);
- return table[1];
-}
-
-int table[] = { 1, 0, 3, 4 };
+++ /dev/null
-
-struct Foo { int X; };
-
-void bar() {}
-
-int main() {
- Foo X;
- X = ({ bar(); Foo(); });
-}
+++ /dev/null
-
-int main() {
- char title[] = "foo and stuff\n";
- printf("%s", title);
- return 0;
-}
+++ /dev/null
-struct test_empty {
-} e;
-int Esize = sizeof(e);
-
-struct rtx_def {
- unsigned short code;
- long long :3;
- int mode : 8;
- long long :0;
- long long x :31;
- //long long y:31;
-} N = {2, 7, 1 };
-int Nsize = sizeof(N); // Size = 8
-
-struct test1 {
- char x:1;
- long long :0;
-} F1; int F1size = sizeof(F1); // Size = 4
-
-struct test2 {
- long long x :4;
-} F2; int F2size = sizeof(F2); // Size = 4
-
-struct test3 {
- char x:1;
- long long :20;
-} F3; int F3size = sizeof(F3); // Size = 3
-
-struct test4 {
- char x:1;
- long long :21;
- short Y : 14;
-} F4; int F4size = sizeof(F4); // Size = 6
-
-struct test5 {
- char x:1;
- long long :17;
- char Y : 1;
-} F5; int F5size = sizeof(F5); // Size = 3
-
-struct test6 {
- char x:1;
- long long :42;
- int Y : 21;
-} F6; int F6size = sizeof(F6); // Size = 8
-
-struct test {
- char c;
- char d : 3;
- char e: 3;
- int : 0;
- char f;
- char :0;
- long long x : 4;
-} M; int Msize = sizeof(M); // Size = 8
-
-int main() {
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-#include <math.h>
-
-int target_isinf(double x) {
- union {
- double d;
- struct {
- unsigned mantissa2;
- unsigned mantissa1 : 20;
- unsigned exponent : 11;
- unsigned sign : 1;
- } big_endian;
- } u;
-
- u.d = x;
- return (u.big_endian.exponent == 2047 && u.big_endian.mantissa1 == 0 && u.big_endian.mantissa2 == 0);
-}
-
-int main() {
- printf("%d %d\n", target_isinf(1234.42), target_isinf(1.0/1.0e-1000));
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-
-int __signbit (double __x) {
- union { double __d; int __i[3]; } __u = { __d: __x };
- return __u.__i[1] < 0;
-}
-
-int main() {
- printf("%d %d\n", __signbit(-1), __signbit(2.0));
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-
-struct sometimes {
- short offset; short bit;
- short live_length; short calls_crossed;
-} Y;
-
-int main() {
- int X;
- {
- struct sometimes { int X, Y; } S;
- S.X = 1;
- X = S.X;
- }
- {
- struct sometimes { char X; } S;
- S.X = -1;
- X += S.X;
- }
- X += Y.offset;
-
- printf("Result is %d\n", X);
- return X;
-}
+++ /dev/null
-#include <stdio.h>
-
-int test(int Num) {
- int Arr[Num];
- Arr[2] = 0;
- return Arr[2];
-}
-
-int main() {
- printf("%d\n", test(4));
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-
-typedef union {
- float *__fptr;
- int *__iptr;
-} UNION __attribute__ ((__transparent_union__));
-
-int try(UNION U) {
- return 1;
-}
-int test() {
- int I;
- float F;
- return try(&I) | try(&F);
-}
-
-int main() {
- if (test()) printf("ok");
- return 0;
-}
+++ /dev/null
-
-
-struct foo {
- int y;
- foo();
-};
-
-struct bar : public foo {
- //int x;
- bar();
-};
-
-bar::bar() { }
-foo::foo() { }
-
-int main() { return 0; }
+++ /dev/null
-
-
-struct foo {
- int y;
- foo();
- virtual int T() = 0;
-};
-
-struct bar : public foo {
- bar();
- int T() {}
-};
-
-foo::foo() : y(4) { }
-bar::bar() { }
-int main() { return 0; }
+++ /dev/null
-void bar(){}
-
-void foo() {
- struct TEST {
- ~TEST() { bar(); }
- } TESTOBJ;
-
-}
-
-int main() { return 0; }
+++ /dev/null
-typedef struct {
- char *auth_pwfile;
- int x;
-} auth_config_rec;
-
-void *Ptr = &((auth_config_rec*)0)->x;
-
-int main() { return 0; }
+++ /dev/null
-/* This crashes the CFE. */
-extern int volatile test;
-int volatile test = 0;
-
-int main() { return 0; }
+++ /dev/null
-typedef enum
-{
- _URC_NO_REASON = 0,
- _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
- _URC_FATAL_PHASE2_ERROR = 2,
- _URC_FATAL_PHASE1_ERROR = 3,
- _URC_NORMAL_STOP = 4,
- _URC_END_OF_STACK = 5,
- _URC_HANDLER_FOUND = 6,
- _URC_INSTALL_CONTEXT = 7,
- _URC_CONTINUE_UNWIND = 8
-} _Unwind_Reason_Code;
-
-int foo( _Unwind_Reason_Code X) {
- return X;
-}
-
-int main() {
- foo(_URC_END_OF_STACK);
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-
-void ctor() __attribute__((constructor));
-
-void ctor() {
- printf("Create!\n");
-}
-void dtor() __attribute__((destructor));
-
-void dtor() {
- printf("Create!\n");
-}
-
-int main() { return 0; }
+++ /dev/null
-#include <stdio.h>
-//extern int printf(const char *, ...);
-
-int CN = 0;
-int DN = 0;
-
-struct foo {
- int Num;
- foo(int num) : Num(num) {
- printf("Foo ctor %d %d\n", Num, CN++);
- }
- ~foo() {
- printf("Foo dtor %d %d\n", Num, DN++);
- }
-} Constructor1(7); // Global with ctor to be called before main
-foo Constructor2(12);
-
-struct bar {
- ~bar() {
- printf("bar dtor\n");
- }
-} Destructor1; // Global with dtor
-
-int main() {
- printf("main\n");
- return 0;
-}
+++ /dev/null
-// This testcase was causing an incorrect type emission for data.
-double data[100];
-
-double *dpa = data;
-double *dpb = data+100;
-
-int main() { return 0; }
+++ /dev/null
-typedef struct {
- int w;
-// float x;
-// double y;
-// long long z;
-} S1Ty;
-
-typedef struct {
- S1Ty A, B;
-} S2Ty;
-
-void takeS1(S1Ty *V) {}
-void takeVoid(void *P) {}
-
-int main() {
- S2Ty E;
- takeS1(&E.B);
- takeVoid(&E);
- return 0;
-}
-
+++ /dev/null
-#include <stdio.h>
-
-struct B { int i, j; };
-struct D : public B {};
-int D::*di = &D::i;
-int D::*dj = &D::j;
-
-int main() {
- D d;
- d.i = d.j = 0;
- d.*di = 4;
- d.*dj = 7;
-
- printf("%d %d\n", d.i, d.j);
-
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-
-struct B {
- int X;
- void i() {
- printf("i, %d\n", X);
- }
- void j() {
- printf("j, %d\n", X);
- }
-};
-
-void foo(int V, void (B::*Fn)()) {
- B b; b.X = V;
- (b.*Fn)();
-}
-
-int main() {
- foo(4, &B::i);
- foo(6, &B::j);
- foo(-1, &B::i);
- return 0;
-}