rui314 / 8cc

A Small C Compiler
MIT License
6.13k stars 740 forks source link

Miscompilation bug #55

Open andrewchambers opened 9 years ago

andrewchambers commented 9 years ago

Following code aborts with 8cc at runtime, works with gcc 4.9.2 and tcc 0.9.26.

void abort(void);
int a[] = L"foo";
int b = 0;
int main() {
  if (a[2] != L'o' || b)
    abort();
  return 0;
}