http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59648
--- Comment #5 from David Kredba <nheghathivhistha at gmail dot com> --- I tried to write a script for c-reduce. It writes output from compiler in two steps but grep not waits and c-reduce not wanted to accept it as valid for reducing case becuse test error level was not OK. When I modified it this way: #!/bin/bash TESTCASE=${1:-testcase.i} x86_64-pc-linux-gnu-gcc -std=gnu99 -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -fvisibility=hidden -O2 -ggdb -pipe -march=native -mtune=native -flto=4 -o /dev/null /home/dave2/$TESTCASE /home/dave2/libxservertest.a > /home/dave2/test.txt 2>&1 cat /home/dave2/test.txt | grep -q 'error: array subscript is below array bounds' if ! test $? = 0; then exit 1 fi exit 0 then grep was returning expected return code but c-reduce was not able to remove any line. I think I am missing some very basic thing here :-(. PS I know that grep can be called with a file name without using cat and pipe but it not wanted to work too.