https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126153

--- Comment #7 from Sam James <sjames at gcc dot gnu.org> ---
Just do this:
```
#!/bin/bash

# It should build fine without optimisation
/usr/bin/gcc -w bug1227.c || exit 1
# It should run fine without optimisation
./a.out || exit 1

# It should compile fine with optimisation
~/gcc/results/bin/gcc -w -O3  -ftrivial-auto-var-init=zero bug1227.c || exit 1
# It should fail with optimisation (so exit 0 if it crashed)
./a.out || exit 0

# if it succeeds, exit 1, as that's uninteresting
exit 1
```

and cvise test.sh foo.c. Writing it as a compound with && is making it harder
than it needs to be.

Reply via email to