On 8/27/18 10:35 AM, Shubham Narlawar wrote: > Here is the file. I am getting some error in sending .sh file, so I send it > as below. > > #!/bin/bash > gcc -fgnu-tm testcase.c > out.txt 2>&1 &&\ > if > grep 'internal compiler error' out.txt > then > exit 0 > else > exit 1 > fi
When I use creduce, I never write my output to an actual file, but just pipe it directly into grep. My creduce.sh scripts usually look like the following which have worked for me in the past. Peter #!/bin/bash CC="/home/bergner/gcc/build/gcc-fsf-6-pr78543-debug/gcc/xgcc -B/home/bergner/gcc/build/gcc-fsf-6-pr78543-debug/gcc" OPTS="-O3 -S" TEST=pr78543-2.i ${CC} ${OPTS} ${TEST} 2>&1 | grep 'internal compiler error: in push_reload, at reload.c:1349' if ! test $? = 0; then exit 1 fi exit 0