https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109531
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> >'g++-13 -O2 -Wall -c ArithmeticSubtermGeneralization.ii' is enough to
> >reproduce.
>
> Interesting because it was not for me, but I noticed that removing all of
> the lines that begin with "#" is able to reproduce without any options only.
> Anyways my current reproducing script is:
> ```
> if !(~/upstream-gcc/libexec/gcc/x86_64-pc-linux-gnu/13.0.1/cc1plus
> -std=c++14 -fno-checking -quiet -Wfatal-errors $1 >& file1.out); then
> exit 1
> fi
> if !(~/upstream-gcc/libexec/gcc/x86_64-pc-linux-gnu/13.0.1/cc1plus
> -std=c++14 -quiet -Wfatal-errors $1 >& file.out); then
> if grep "hashtab_chk_error" file.out >&/dev/null; then
> exit 0
> fi
> exit 1
> fi
> if !(~/upstream-gcc/libexec/gcc/x86_64-pc-linux-gnu/13.0.1/cc1plus
> -std=c++14 -march=znver3 -O2 -fno-strict-aliasing -Wall -quiet
> -Wfatal-errors $1 >& file1.out); then
> if grep "hashtab_chk_error" file1.out >&/dev/null; then
> exit 0
> fi
> exit 1
> fi
> ```
>
> Yes it is more complex than a standard one would be because I want to reduce
> it to be a valid testcase (the first run of cc1plus) and then I noticed
> sometimes it reproduces with slightly different options so test with those.
> Hopefully the -fno-checking is enough to force not checking hashtable
> checking ...
You can achieve result with the following command with C-Vise:
cvise -c 'timeout 5 g++ -std=c++14 -march=znver3 -O2 -fno-strict-aliasing
-Wall ArithmeticSubtermGeneralization.ii -w -Wfatal-errors 2>&1 | grep
hashtab_chk_error && timeout 5 g++-13 ArithmeticSubtermGeneralization.ii -c
-Wfatal-errors -w' ArithmeticSubtermGeneralization.ii
I'm currently reducing that right now..