https://github.com/rindeal/Amalgamate
Which seems interesting, however when I tried the FreeType example, there seemed to be some preprocessing issue, such that some function definitions are conditionally excluded even though they are called later. I didn't have the time to find out if this was an issue in the original code or if the amalgamation script introduced it.
In any case, such single-C programs are very useful for quickly testing tools, so having more of them would be great.
Not open source but happy to share benchmarks if that would be useful.
Also, would you mind comparing it to Csmith (https://embed.cs.utah.edu/csmith/)?
I wasn't aware of Csmith so thanks for highlighting. My C code doesn't really test many features of the compiler so I suspect mainly of interest in seeing just how the compiler handles a really large single file.
Hardware 2016 12" MacBook (1.1GHz Core m3) Ubuntu 20.04 running in Docker Clang 9 -O0 optimisation (more optimisation increases the compile times a lot!)
0.53m LOC 41MB 34s
0.99m LOC 76MB 91s
1.44m LOC 110MB 167s
I suspect the code is relatively straightforward to compile - few function calls etc.
So for every loop continue statement there is a GPL license text :D
In practice, it doesn't matter at all as the preprocessor replaces all license headers with a single space even before the compiler has the chance to look at it.