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

            Bug ID: 95206
           Summary: internal compiler error: in sign_mask, at
                    wide-int.h:855
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danny.schneider at posteo dot de
  Target Milestone: ---

Created attachment 48564
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48564&action=edit
intermediate file which contains failing code example

compile (which worded fine with 9.3 and lower) now with gcc 10.1.0 reports 
" internal compiler error: in sign_mask, at wide-int.h:855"
when the template type is an unsigned char (u8)

This is the Compiler Output:

g++ -c -pipe -g -std=c++11 -Wall -Wextra -O0 -Wcpp -save-temps=obj -Wall
-Wextra -fPIC -DQT_QML_DEBUG -I../test_gcc10_bug -I.
-I/usr/lib/qt/mkspecs/linux-g++ -o main.o ../test_gcc10_bug/main.cpp
g++ -c -pipe -g -std=c++11 -Wall -Wextra -O0 -Wcpp -save-temps=obj -Wall
-Wextra -fPIC -DQT_QML_DEBUG -I../test_gcc10_bug -I.
-I/usr/lib/qt/mkspecs/linux-g++ -o utest_countbitsset.o
../test_gcc10_bug/utest_countbitsset.cpp
g++: warning: ‘-pipe’ ignored because ‘-save-temps’ specified
g++: warning: ‘-pipe’ ignored because ‘-save-temps’ specified
In file included from ../test_gcc10_bug/main.cpp:8:
../test_gcc10_bug/countbitsset.h:38: warning: ignoring ‘#pragma GCC
diagnosTc’ [-Wunknown-pragmas]
   38 | #pragma GCC diagnosTc push
      | 
../test_gcc10_bug/countbitsset.h:39: warning: ignoring ‘#pragma GCC
diagnosTc’ [-Wunknown-pragmas]
   39 | #pragma GCC diagnosTc ignored "-Wshift-count-overflow"
      | 
../test_gcc10_bug/countbitsset.h:42: warning: ignoring ‘#pragma GCC
diagnosTc’ [-Wunknown-pragmas]
   42 | #pragma GCC diagnosTc pop
      | 
../test_gcc10_bug/countbitsset.h: In instantiation of ‘u8 countbitsset(const
T&) [with T = unsigned char; u8 = unsigned char]’:
../test_gcc10_bug/main.cpp:14:34:   required from here
../test_gcc10_bug/countbitsset.h:36:23: internal compiler error: in sign_mask,
at wide-int.h:855
   36 |               c = ((c >> S[2]) + c) & B[2];          //Bucket of size 8
      |                    ~~~^~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
make: *** [Makefile:780: main.o] Error 1

Reply via email to