C-Reduce is a tool that takes a large C, C++, or OpenCL file that has a property of interest (such as triggering a compiler bug) and automatically produces a much smaller C/C++ file that has the same property. It is intended for use by people who discover and report bugs in compilers and other tools that process source code. C-Reduce is released under a BSD-like license.

Publications and Presentations


C-Reduce is a fixpoint computation that calls a collection of plugins. It is these plugins that actually transform the test case that is being reduced. C-Reduce is thus very easy to improve and extend. Additionally, the C-Reduce core can exploit multiple cores without exposing plugins to concurrency.

Installing C-Reduce

The easy way to install C-Reduce is to find a precompiled package for your OS distribution. Ubuntu since 14.04 has C-Reduce and so do Gentoo and Debian. If you are running macOS, Homebrew can give you a C-Reduce.

If you want to compile and install C-Reduce yourself, please see our our INSTALL file.

C-Reduce has been tested on macOS, FreeBSD, Linux, and Windows.

Source Code

Using C-Reduce


creduce ./test1.sh file.c

Where file.c is a C compilation unit that you wish to reduce and test1.sh is a shell script that returns 0 if a partially reduced C program (a "variant") is interesting and non-zero otherwise. The test script takes no arguments; it should be hard-coded to refer to the same C file that is passed as an argument to C-Reduce.

For more details, please see Using C-Reduce.

Related Tools

Current Projects

We are:


If you find C-Reduce to be useful, please let us know. If it does not work, please let us know about that too. There are two mailing lists: