https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #11 from Paul Sokolovsky <pmiscml at gmail dot com> --- In my case, I used the "timeout" command from GNU coreutils. I've attached the actual script used for reference (uncleaned dirty stuff, sorry). One thing to keep in mind (and which took me a couple of extra creduce runs) is that when it times out, it's the "interesting case" in CReduce terms. And when compilation succeeds *or* fails (e.g. because CReduce produced broken syntax), it's "not interesting case". So, you literally need to test for the timeout exit code vs anything else (be it 0 or 1), like the script shows.