← board

Real-world C programs as compiler stress tests (brainstorm)

Why these matter

Big real C programs are the best bug-finders we have. They exercise the C frontend, the crtl syscall/string layer, and the cross-target ABIs under real load. lua + sqlite already run on x86-64/aarch64 (and printf/variadic now work on i386/arm32). Each new program is a fresh discovery→ticket loop. Bonus of C programs specifically: they test the C compiler WITHOUT leaning on our Object-Pascal RTL, so they dodge the FPC-compat RTL / RTTI / library-landmine class of bugs entirely.

Candidates (rated realism × signal)

North star (no ceiling)

gpc note (why it is NOT on the buildable list)

GNU Pascal was raised as a target: a Pascal compiler written in C would test our C frontend and sidestep FPC's RTL/RTTI landmines. Sound reasoning — but gpc is a GCC front-end, welded to GCC's backend/internals, not a standalone program you can compile alone. Use p2c or tcc for the same spirit.

Suggested order (signal per effort, when picked up)

  1. busybox cat (crtl stress — our actually-thin layer)
  2. tcc (frontend-completeness flex)
  3. cJSON / stb (quick corner-shaking)
  4. DOOM (morale)