On Mon, 27 Aug 2018 at 16:35, 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
> #! gcc -c -fgnu-tm testcase.c

This script doesn't work. If an ICE happens GCC will exit with a
non-zero exit status, so the right hand side of the && will not run.
So it will never do the grep.

Reply via email to