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

            Bug ID: 105008
           Summary: ICE: tree check: expected class 'type', have
                    'exceptional' (error_mark) in shorten_binary_op, at
                    c-family/c-common.cc:1400 with unsigned _Fract vector
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: error-recovery
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: mips64el-unknown-linux-gnuabi64

Created attachment 52659
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52659&action=edit
reduced testcase

Compiler output:
$ mips64el-unknown-linux-gnuabi64-gcc testcase.c 
testcase.c: In function 'foo':
testcase.c:9:3: error: cannot convert value to a vector
    9 |   v /= a;
      |   ^
testcase.c:9:3: internal compiler error: tree check: expected class 'type',
have 'exceptional' (error_mark) in shorten_binary_op, at
c-family/c-common.cc:1400
0x755da1 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        /repo/gcc-trunk/gcc/tree.cc:8774
0x5c4262 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        /repo/gcc-trunk/gcc/tree.h:3574
0x5c4262 shorten_binary_op(tree_node*, tree_node*, tree_node*, bool)
        /repo/gcc-trunk/gcc/c-family/c-common.cc:1400
0x8de486 build_binary_op(unsigned int, tree_code, tree_node*, tree_node*, bool)
        /repo/gcc-trunk/gcc/c/c-typeck.cc:12699
0x8eb072 build_modify_expr(unsigned int, tree_node*, tree_node*, tree_code,
unsigned int, tree_node*, tree_node*)
        /repo/gcc-trunk/gcc/c/c-typeck.cc:6300
0x90ae44 c_parser_expr_no_commas
        /repo/gcc-trunk/gcc/c/c-parser.cc:7567
0x90afa1 c_parser_expression
        /repo/gcc-trunk/gcc/c/c-parser.cc:10697
0x90b708 c_parser_expression_conv
        /repo/gcc-trunk/gcc/c/c-parser.cc:10736
0x9006e7 c_parser_statement_after_labels
        /repo/gcc-trunk/gcc/c/c-parser.cc:6263
0x902cca c_parser_compound_statement_nostart
        /repo/gcc-trunk/gcc/c/c-parser.cc:5800
0x922c15 c_parser_compound_statement
        /repo/gcc-trunk/gcc/c/c-parser.cc:5609
0x924698 c_parser_declaration_or_fndef
        /repo/gcc-trunk/gcc/c/c-parser.cc:2544
0x92c7e3 c_parser_external_declaration
        /repo/gcc-trunk/gcc/c/c-parser.cc:1779
0x92d22b c_parser_translation_unit
        /repo/gcc-trunk/gcc/c/c-parser.cc:1652
0x92d22b c_parse_file()
        /repo/gcc-trunk/gcc/c/c-parser.cc:23357
0x98f2dd c_common_parse_file()
        /repo/gcc-trunk/gcc/c-family/c-opts.cc:1240
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ mips64el-unknown-linux-gnuabi64-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-mips64el/bin/mips64el-unknown-linux-gnuabi64-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-7721-20220319135312-gb60bc913cca-checking-yes-rtl-df-extra-mips64el/bin/../libexec/gcc/mips64el-unknown-linux-gnuabi64/12.0.1/lto-wrapper
Target: mips64el-unknown-linux-gnuabi64
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl
--with-sysroot=/usr/mips64el-unknown-linux-gnuabi64 --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=mips64el-unknown-linux-gnuabi64
--with-ld=/usr/bin/mips64el-unknown-linux-gnuabi64-ld
--with-as=/usr/bin/mips64el-unknown-linux-gnuabi64-as --disable-multilib
--with-abi=64 --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-7721-20220319135312-gb60bc913cca-checking-yes-rtl-df-extra-mips64el
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220319 (experimental) (GCC)

Reply via email to