[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [creduce-bugs] creduce expanding file instead of reducing
Hi Matthias,
Thanks for reporting the issue.
I couldn't reproduce the GCC failure on my machine running Ubuntu 14.04
(detailed below). Looks like the crash was specific to
powerpc64le-linux-gnu, which I don't have access to. Do you happen to
know which C-Reduce transformation caused the code expansion, or do you
have any saved log/intermediate files that were produced during the
reduction? Thanks.
$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/chenyang/work/compilers/compiler-install/gcc-r222227/bin/gcc
COLLECT_LTO_WRAPPER=/home/chenyang/work/compilers/compiler-install/gcc-r222227/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure
--prefix=/home/chenyang/work/compilers/compiler-install/gcc-r222227
--enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 6.0.0 20150420 (experimental) (GCC)
$ gcc -g -O -Wformat -Werror=format-security -Wall -Wextra -c
stress-cpu.i ; echo $?
0
- Yang
On 04/19/2015 09:47 AM, Matthias Klose wrote:
seen for the first time, creduce expands a file instead of reducing. The
example file is available at
https://gcc.gnu.org/PR65807
Attaching the log of the creduce run.
Matthias
$ cat cr.sh
if [ $# -ne 1 ]; then
echo "usage: $0 <file.c>" 1>&2
exit 1
fi
CLANG=${CLANG:-clang}
GCC=${GCC:-gcc}
GCC=gcc
ARGS="-g -O -Wformat -Werror=format-security -Wall -Wextra -c"
msg="internal compiler error: Segmentation fault"
$GCC $ARGS $1 > out.txt 2>&1
if fgrep -q "$msg" out.txt
then
fgrep -v "$msg" out.txt > out2.txt
if fgrep -q ': error:' out2.txt; then
exit 1
elif fgrep -q ': warning:' out2.txt; then
exit 1
fi
exit 0
else
exit 1
fi