https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108354
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > (In reply to Andrew Pinski from comment #2) > > This is a specific case of PR 91213 and the case which will also fix PR > > 96921: > > > > /* 1 - a is a ^ 1 if a had a bool range. */ > > (simplify > > (minus integer_onep@0 SSA_NAME@1) > > (if (INTEGRAL_TYPE_P (type) > > && ssa_name_has_boolean_range (@1)) > > (bit_xor @1 @0))) > > I might be running into an Ada build failure with this patch; I am double > checking this now. It also could be a latent bug ... I added an extra check for TYPE_UNSIGNED and there is still an issue. I suspect there might be a latent bug happening somewhere. apinski@xeond:~/src/upstream-gcc/gcc/objdir/gcc/ada/tools$ ../../xgcc -B../../ -c -g -O2 -W -Wall -gnatpg -gnata -I- -I../rts -I. -I/home/apinski/src/upstream-gcc/gcc/gcc/ada /home/apinski/src/upstream-gcc/gcc/gcc/ada/gnatlink.adb -o gnatlink.o -v Reading specs from ../../specs COLLECT_GCC=../../xgcc Target: x86_64-pc-linux-gnu Configured with: /home/apinski/src/upstream-gcc/gcc/configure --prefix=/home/apinski/upstream-gcc --enable-languages=c,c++,fortran,lto,objc,go,ada Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.1 20230131 (experimental) [master 733988099bc] (GCC) COLLECT_GCC_OPTIONS='-B' '../../' '-c' '-g' '-O2' '-Wextra' '-Wall' '-gnatpg' '-gnata' '-I' '-' '-I' '../rts' '-I' '.' '-I' '/home/apinski/src/upstream-gcc/gcc/gcc/ada' '-o' 'gnatlink.o' '-v' '-mtune=generic' '-march=x86-64' ../../gnat1 -I - -I ../rts -I . -I /home/apinski/src/upstream-gcc/gcc/gcc/ada -quiet -O2 -Wextra -Wall -dumpbase gnatlink.adb -dumpbase-ext .adb -gnatwa -g -gnatpg -gnata -mtune=generic -march=x86-64 -gnatO gnatlink.o /home/apinski/src/upstream-gcc/gcc/gcc/ada/gnatlink.adb -o /tmp/ccn5ePu7.s raised STORAGE_ERROR : stack overflow or erroneous memory access