head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.3
	netbsd-11-0-RC3:1.1.1.3
	netbsd-11-0-RC2:1.1.1.3
	netbsd-11-0-RC1:1.1.1.3
	perseant-exfatfs-base-20250801:1.1.1.3
	netbsd-11:1.1.1.3.0.10
	netbsd-11-base:1.1.1.3
	netbsd-10-1-RELEASE:1.1.1.3
	perseant-exfatfs-base-20240630:1.1.1.3
	perseant-exfatfs:1.1.1.3.0.8
	perseant-exfatfs-base:1.1.1.3
	netbsd-8-3-RELEASE:1.1.1.2
	netbsd-9-4-RELEASE:1.1.1.2
	netbsd-10-0-RELEASE:1.1.1.3
	netbsd-10-0-RC6:1.1.1.3
	netbsd-10-0-RC5:1.1.1.3
	netbsd-10-0-RC4:1.1.1.3
	netbsd-10-0-RC3:1.1.1.3
	netbsd-10-0-RC2:1.1.1.3
	netbsd-10-0-RC1:1.1.1.3
	netbsd-10:1.1.1.3.0.6
	netbsd-10-base:1.1.1.3
	netbsd-9-3-RELEASE:1.1.1.2
	cjep_sun2x:1.1.1.3.0.4
	cjep_sun2x-base:1.1.1.3
	cjep_staticlib_x-base1:1.1.1.3
	netbsd-9-2-RELEASE:1.1.1.2
	cjep_staticlib_x:1.1.1.3.0.2
	cjep_staticlib_x-base:1.1.1.3
	netbsd-9-1-RELEASE:1.1.1.2
	phil-wifi-20200421:1.1.1.3
	phil-wifi-20200411:1.1.1.3
	phil-wifi-20200406:1.1.1.3
	netbsd-8-2-RELEASE:1.1.1.2
	netbsd-9-0-RELEASE:1.1.1.2
	netbsd-9-0-RC2:1.1.1.2
	netbsd-9-0-RC1:1.1.1.2
	netbsd-9:1.1.1.2.0.28
	netbsd-9-base:1.1.1.2
	phil-wifi-20190609:1.1.1.2
	netbsd-8-1-RELEASE:1.1.1.2
	netbsd-8-1-RC1:1.1.1.2
	pgoyette-compat-merge-20190127:1.1.1.2
	pgoyette-compat-20190127:1.1.1.2
	pgoyette-compat-20190118:1.1.1.2
	pgoyette-compat-1226:1.1.1.2
	pgoyette-compat-1126:1.1.1.2
	pgoyette-compat-1020:1.1.1.2
	pgoyette-compat-0930:1.1.1.2
	pgoyette-compat-0906:1.1.1.2
	netbsd-7-2-RELEASE:1.1.1.2
	pgoyette-compat-0728:1.1.1.2
	clang-337282:1.1.1.2
	netbsd-8-0-RELEASE:1.1.1.2
	phil-wifi:1.1.1.2.0.26
	phil-wifi-base:1.1.1.2
	pgoyette-compat-0625:1.1.1.2
	netbsd-8-0-RC2:1.1.1.2
	pgoyette-compat-0521:1.1.1.2
	pgoyette-compat-0502:1.1.1.2
	pgoyette-compat-0422:1.1.1.2
	netbsd-8-0-RC1:1.1.1.2
	pgoyette-compat-0415:1.1.1.2
	pgoyette-compat-0407:1.1.1.2
	pgoyette-compat-0330:1.1.1.2
	pgoyette-compat-0322:1.1.1.2
	pgoyette-compat-0315:1.1.1.2
	netbsd-7-1-2-RELEASE:1.1.1.2
	pgoyette-compat:1.1.1.2.0.24
	pgoyette-compat-base:1.1.1.2
	netbsd-7-1-1-RELEASE:1.1.1.2
	clang-319952:1.1.1.2
	matt-nb8-mediatek:1.1.1.2.0.22
	matt-nb8-mediatek-base:1.1.1.2
	clang-309604:1.1.1.2
	perseant-stdc-iso10646:1.1.1.2.0.20
	perseant-stdc-iso10646-base:1.1.1.2
	netbsd-8:1.1.1.2.0.18
	netbsd-8-base:1.1.1.2
	prg-localcount2-base3:1.1.1.2
	prg-localcount2-base2:1.1.1.2
	prg-localcount2-base1:1.1.1.2
	prg-localcount2:1.1.1.2.0.16
	prg-localcount2-base:1.1.1.2
	pgoyette-localcount-20170426:1.1.1.2
	bouyer-socketcan-base1:1.1.1.2
	pgoyette-localcount-20170320:1.1.1.2
	netbsd-7-1:1.1.1.2.0.14
	netbsd-7-1-RELEASE:1.1.1.2
	netbsd-7-1-RC2:1.1.1.2
	clang-294123:1.1.1.2
	netbsd-7-nhusb-base-20170116:1.1.1.2
	bouyer-socketcan:1.1.1.2.0.12
	bouyer-socketcan-base:1.1.1.2
	clang-291444:1.1.1.2
	pgoyette-localcount-20170107:1.1.1.2
	netbsd-7-1-RC1:1.1.1.2
	pgoyette-localcount-20161104:1.1.1.2
	netbsd-7-0-2-RELEASE:1.1.1.2
	localcount-20160914:1.1.1.2
	netbsd-7-nhusb:1.1.1.2.0.10
	netbsd-7-nhusb-base:1.1.1.2
	clang-280599:1.1.1.2
	pgoyette-localcount-20160806:1.1.1.2
	pgoyette-localcount-20160726:1.1.1.2
	pgoyette-localcount:1.1.1.2.0.8
	pgoyette-localcount-base:1.1.1.2
	netbsd-7-0-1-RELEASE:1.1.1.2
	clang-261930:1.1.1.2
	netbsd-7-0:1.1.1.2.0.6
	netbsd-7-0-RELEASE:1.1.1.2
	netbsd-7-0-RC3:1.1.1.2
	netbsd-7-0-RC2:1.1.1.2
	netbsd-7-0-RC1:1.1.1.2
	clang-237755:1.1.1.2
	clang-232565:1.1.1.2
	clang-227398:1.1.1.2
	tls-maxphys-base:1.1.1.2
	tls-maxphys:1.1.1.2.0.4
	netbsd-7:1.1.1.2.0.2
	netbsd-7-base:1.1.1.2
	clang-215315:1.1.1.2
	clang-209886:1.1.1.1
	yamt-pagecache:1.1.1.1.0.4
	yamt-pagecache-base9:1.1.1.1
	tls-earlyentropy:1.1.1.1.0.2
	tls-earlyentropy-base:1.1.1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.1
	riastradh-drm2-base3:1.1.1.1
	clang-202566:1.1.1.1
	clang-201163:1.1.1.1
	clang-199312:1.1.1.1
	clang-198450:1.1.1.1
	clang-196603:1.1.1.1
	clang-195771:1.1.1.1
	LLVM:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2013.11.28.14.14.55;	author joerg;	state Exp;
branches
	1.1.1.1;
next	;
commitid	ow8OybrawrB1f3fx;

1.1.1.1
date	2013.11.28.14.14.55;	author joerg;	state Exp;
branches
	1.1.1.1.4.1;
next	1.1.1.2;
commitid	ow8OybrawrB1f3fx;

1.1.1.2
date	2014.08.10.17.08.44;	author joerg;	state Exp;
branches
	1.1.1.2.4.1
	1.1.1.2.26.1;
next	1.1.1.3;
commitid	N85tXAN6Ex9VZPLx;

1.1.1.3
date	2019.11.13.22.20.18;	author joerg;	state dead;
branches;
next	;
commitid	QD8YATxuNG34YJKB;

1.1.1.1.4.1
date	2013.11.28.14.14.55;	author yamt;	state dead;
branches;
next	1.1.1.1.4.2;
commitid	WSrDtL5nYAUyiyBx;

1.1.1.1.4.2
date	2014.05.22.16.19.00;	author yamt;	state Exp;
branches;
next	;
commitid	WSrDtL5nYAUyiyBx;

1.1.1.2.4.1
date	2014.08.10.17.08.44;	author tls;	state dead;
branches;
next	1.1.1.2.4.2;
commitid	jTnpym9Qu0o4R1Nx;

1.1.1.2.4.2
date	2014.08.19.23.48.01;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.1.1.2.26.1
date	2020.04.13.07.47.32;	author martin;	state dead;
branches;
next	;
commitid	X01YhRUPVUDaec4C;


desc
@@


1.1
log
@Initial revision
@
text
@//-*- C -*-

/* This is a 
   multiline comment */

// Intended to exercise all syntactic parts of the C language.

int g0;
int g1, g2;

struct s0;

struct s0 {
  int x;
};

int g3 = 10;

__asm("");

typedef int td0;

td0 g4;

enum e0 {
  ec0
};

static void f0(int x) {
}

inline void f0_0(int x) {
  ;
}

extern void f0_1(int x) {
}

void f1(int, ...);

// Statements.
void f2() {
  for (;;) {
    break;
    continue;
  }

  while (0) {
  }

  do {
  } while (0);

  void *label = &&theif;
  goto *label;

  goto theif;
theif:
  if (0) {
    ;
  } else if (0) {
  } else {
  }

  switch(0) {
  case 0:
  case 1 ... 2:
    break;
  default:
    break;
  }

  asm ("nop");

  return;
}

// Expressions.

#include <stdarg.h>

typedef struct ipair {
  int first, second;
} ipair;

void f4(int a0, int a1, int a2, va_list ap) {
  int t0 = a0 ? a1 : a2;
  float t1 = (float) a0;
  ipair t2 = {1, 2};
  ipair t2a = { .second = 2 };
  int t3 = sizeof(ipair);
  ipair t4;
  t4 = (ipair) {1, 2};
  extern int g(int);
  int t5 = g(a0);
  int t6 = t4.first;
  int t7[10];
  int t8 = t7[a0];
  t8++;
  const char *t9 = __FUNCTION__;
  char t10 = 'x';
  int t11 = __builtin_offsetof(ipair, first);
  int t12 = __builtin_types_compatible_p(ipair, int);  
  int t12_0 = __builtin_classify_type(t0);
  int t12_1 = __builtin_classify_type(t1);
  int t12_2 = __builtin_classify_type(t2);
  // FIXME: Add _Complex and aggregate cases.
  int t13 = va_arg(ap, int);
  va_list t13_0;
  va_copy(t13_0, ap);
  int t14 = __extension__(t13);
  int t15 = +t13;
  unsigned t16 = t14 ^ t15;
  int t17 = t14 % t15;
  int t17_0 = t16 % t16;
  float t18;
  int t19 = t18 ? 0 : 1;
  char *t20; ++t20; --t20;
  float t21; ++t21; --t21;
  double t22; ++t22; --t22;
  long double t23; ++t23; --t23;
  int t24 = !t19;
  int t25 = __real t24;
  int t26 = __imag t24;
  const char *t27 = t9;
  t27 += (unsigned char) 0xFF;
  t27 += (signed char) 0xFF;
  
  struct { char f0[10]; } *t28;
  int t29 = t28 - t28;
  char *t30 = &t28->f0[1];

  struct s1 { int f0; };
  struct s1 t31_a, t31_b;
  int t31_cond;
  int t31 = (t31_cond ? t31_a : t31_b).f0;

  _Complex float t32_a, t32_b;
  int t32_cond;
  int t32 = __real (t32_cond ? t32_a : t32_b);

  struct { int x, y; } t33, *t34, t35[12], t36(int, float);
  float t37, *t38, t39[9], t40(double);
}

// Extended vectors

typedef __attribute__((ext_vector_type(2))) float float2;
typedef __attribute__((ext_vector_type(4))) float float4;

void f5() {
  float4 t0 = (float4) { 0, 1, 2, 3 };
  float4 t1 = t0;
  t0.lo.even = t1.hi.x;

  // irgen doesn't support this yet.
#if 0
  int t2_cond;
  float2 t2 = (t2_cond ? t0 : t1).lo;
#endif
}

void f6() {
  const char *s0 = __func__;
  const char *s1 = __FUNCTION__;
  const char *s2 = __PRETTY_FUNCTION__;
}

// Arg mismatch with passed type.
void f7(x) 
     float x;
{
}

void f8(x) 
     short x;
{
}

// Function which inputs an array
void f9(int x[]) { }

// Object literals.
void f10() {
  struct f10_s0 {
    char iv0[10];
  } x;

  x = (struct f10_s0) { .iv0 = "name" };
}

// Nested structures.
struct s11 {
  struct s11_2 {
    int f0;
  } f0;
  int f1;
};
@


1.1.1.1
log
@Import Clang 3.4rc1 r195771.
@
text
@@


1.1.1.2
log
@Import clang 3.6svn r215315.
@
text
@a198 12

// Unnamed structures.
struct s12 {
  struct {
    unsigned char aa;
    unsigned char bb;
  };
};

void f11() {
  struct s12 var = { .aa = 33 };
}
@


1.1.1.2.26.1
log
@Mostly merge changes from HEAD upto 20200411
@
text
@@


1.1.1.3
log
@Mark old LLVM instance as dead.
@
text
@@


1.1.1.2.4.1
log
@file c-language-features.inc was added on branch tls-maxphys on 2014-08-19 23:48:01 +0000
@
text
@d1 210
@


1.1.1.2.4.2
log
@Rebase to HEAD as of a few days ago.
@
text
@a0 210
//-*- C -*-

/* This is a 
   multiline comment */

// Intended to exercise all syntactic parts of the C language.

int g0;
int g1, g2;

struct s0;

struct s0 {
  int x;
};

int g3 = 10;

__asm("");

typedef int td0;

td0 g4;

enum e0 {
  ec0
};

static void f0(int x) {
}

inline void f0_0(int x) {
  ;
}

extern void f0_1(int x) {
}

void f1(int, ...);

// Statements.
void f2() {
  for (;;) {
    break;
    continue;
  }

  while (0) {
  }

  do {
  } while (0);

  void *label = &&theif;
  goto *label;

  goto theif;
theif:
  if (0) {
    ;
  } else if (0) {
  } else {
  }

  switch(0) {
  case 0:
  case 1 ... 2:
    break;
  default:
    break;
  }

  asm ("nop");

  return;
}

// Expressions.

#include <stdarg.h>

typedef struct ipair {
  int first, second;
} ipair;

void f4(int a0, int a1, int a2, va_list ap) {
  int t0 = a0 ? a1 : a2;
  float t1 = (float) a0;
  ipair t2 = {1, 2};
  ipair t2a = { .second = 2 };
  int t3 = sizeof(ipair);
  ipair t4;
  t4 = (ipair) {1, 2};
  extern int g(int);
  int t5 = g(a0);
  int t6 = t4.first;
  int t7[10];
  int t8 = t7[a0];
  t8++;
  const char *t9 = __FUNCTION__;
  char t10 = 'x';
  int t11 = __builtin_offsetof(ipair, first);
  int t12 = __builtin_types_compatible_p(ipair, int);  
  int t12_0 = __builtin_classify_type(t0);
  int t12_1 = __builtin_classify_type(t1);
  int t12_2 = __builtin_classify_type(t2);
  // FIXME: Add _Complex and aggregate cases.
  int t13 = va_arg(ap, int);
  va_list t13_0;
  va_copy(t13_0, ap);
  int t14 = __extension__(t13);
  int t15 = +t13;
  unsigned t16 = t14 ^ t15;
  int t17 = t14 % t15;
  int t17_0 = t16 % t16;
  float t18;
  int t19 = t18 ? 0 : 1;
  char *t20; ++t20; --t20;
  float t21; ++t21; --t21;
  double t22; ++t22; --t22;
  long double t23; ++t23; --t23;
  int t24 = !t19;
  int t25 = __real t24;
  int t26 = __imag t24;
  const char *t27 = t9;
  t27 += (unsigned char) 0xFF;
  t27 += (signed char) 0xFF;
  
  struct { char f0[10]; } *t28;
  int t29 = t28 - t28;
  char *t30 = &t28->f0[1];

  struct s1 { int f0; };
  struct s1 t31_a, t31_b;
  int t31_cond;
  int t31 = (t31_cond ? t31_a : t31_b).f0;

  _Complex float t32_a, t32_b;
  int t32_cond;
  int t32 = __real (t32_cond ? t32_a : t32_b);

  struct { int x, y; } t33, *t34, t35[12], t36(int, float);
  float t37, *t38, t39[9], t40(double);
}

// Extended vectors

typedef __attribute__((ext_vector_type(2))) float float2;
typedef __attribute__((ext_vector_type(4))) float float4;

void f5() {
  float4 t0 = (float4) { 0, 1, 2, 3 };
  float4 t1 = t0;
  t0.lo.even = t1.hi.x;

  // irgen doesn't support this yet.
#if 0
  int t2_cond;
  float2 t2 = (t2_cond ? t0 : t1).lo;
#endif
}

void f6() {
  const char *s0 = __func__;
  const char *s1 = __FUNCTION__;
  const char *s2 = __PRETTY_FUNCTION__;
}

// Arg mismatch with passed type.
void f7(x) 
     float x;
{
}

void f8(x) 
     short x;
{
}

// Function which inputs an array
void f9(int x[]) { }

// Object literals.
void f10() {
  struct f10_s0 {
    char iv0[10];
  } x;

  x = (struct f10_s0) { .iv0 = "name" };
}

// Nested structures.
struct s11 {
  struct s11_2 {
    int f0;
  } f0;
  int f1;
};

// Unnamed structures.
struct s12 {
  struct {
    unsigned char aa;
    unsigned char bb;
  };
};

void f11() {
  struct s12 var = { .aa = 33 };
}
@


1.1.1.1.4.1
log
@file c-language-features.inc was added on branch yamt-pagecache on 2014-05-22 16:19:00 +0000
@
text
@d1 198
@


1.1.1.1.4.2
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@a0 198
//-*- C -*-

/* This is a 
   multiline comment */

// Intended to exercise all syntactic parts of the C language.

int g0;
int g1, g2;

struct s0;

struct s0 {
  int x;
};

int g3 = 10;

__asm("");

typedef int td0;

td0 g4;

enum e0 {
  ec0
};

static void f0(int x) {
}

inline void f0_0(int x) {
  ;
}

extern void f0_1(int x) {
}

void f1(int, ...);

// Statements.
void f2() {
  for (;;) {
    break;
    continue;
  }

  while (0) {
  }

  do {
  } while (0);

  void *label = &&theif;
  goto *label;

  goto theif;
theif:
  if (0) {
    ;
  } else if (0) {
  } else {
  }

  switch(0) {
  case 0:
  case 1 ... 2:
    break;
  default:
    break;
  }

  asm ("nop");

  return;
}

// Expressions.

#include <stdarg.h>

typedef struct ipair {
  int first, second;
} ipair;

void f4(int a0, int a1, int a2, va_list ap) {
  int t0 = a0 ? a1 : a2;
  float t1 = (float) a0;
  ipair t2 = {1, 2};
  ipair t2a = { .second = 2 };
  int t3 = sizeof(ipair);
  ipair t4;
  t4 = (ipair) {1, 2};
  extern int g(int);
  int t5 = g(a0);
  int t6 = t4.first;
  int t7[10];
  int t8 = t7[a0];
  t8++;
  const char *t9 = __FUNCTION__;
  char t10 = 'x';
  int t11 = __builtin_offsetof(ipair, first);
  int t12 = __builtin_types_compatible_p(ipair, int);  
  int t12_0 = __builtin_classify_type(t0);
  int t12_1 = __builtin_classify_type(t1);
  int t12_2 = __builtin_classify_type(t2);
  // FIXME: Add _Complex and aggregate cases.
  int t13 = va_arg(ap, int);
  va_list t13_0;
  va_copy(t13_0, ap);
  int t14 = __extension__(t13);
  int t15 = +t13;
  unsigned t16 = t14 ^ t15;
  int t17 = t14 % t15;
  int t17_0 = t16 % t16;
  float t18;
  int t19 = t18 ? 0 : 1;
  char *t20; ++t20; --t20;
  float t21; ++t21; --t21;
  double t22; ++t22; --t22;
  long double t23; ++t23; --t23;
  int t24 = !t19;
  int t25 = __real t24;
  int t26 = __imag t24;
  const char *t27 = t9;
  t27 += (unsigned char) 0xFF;
  t27 += (signed char) 0xFF;
  
  struct { char f0[10]; } *t28;
  int t29 = t28 - t28;
  char *t30 = &t28->f0[1];

  struct s1 { int f0; };
  struct s1 t31_a, t31_b;
  int t31_cond;
  int t31 = (t31_cond ? t31_a : t31_b).f0;

  _Complex float t32_a, t32_b;
  int t32_cond;
  int t32 = __real (t32_cond ? t32_a : t32_b);

  struct { int x, y; } t33, *t34, t35[12], t36(int, float);
  float t37, *t38, t39[9], t40(double);
}

// Extended vectors

typedef __attribute__((ext_vector_type(2))) float float2;
typedef __attribute__((ext_vector_type(4))) float float4;

void f5() {
  float4 t0 = (float4) { 0, 1, 2, 3 };
  float4 t1 = t0;
  t0.lo.even = t1.hi.x;

  // irgen doesn't support this yet.
#if 0
  int t2_cond;
  float2 t2 = (t2_cond ? t0 : t1).lo;
#endif
}

void f6() {
  const char *s0 = __func__;
  const char *s1 = __FUNCTION__;
  const char *s2 = __PRETTY_FUNCTION__;
}

// Arg mismatch with passed type.
void f7(x) 
     float x;
{
}

void f8(x) 
     short x;
{
}

// Function which inputs an array
void f9(int x[]) { }

// Object literals.
void f10() {
  struct f10_s0 {
    char iv0[10];
  } x;

  x = (struct f10_s0) { .iv0 = "name" };
}

// Nested structures.
struct s11 {
  struct s11_2 {
    int f0;
  } f0;
  int f1;
};
@


