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

            Bug ID: 96596
           Summary: [11 Regression] ICE: tree check: expected class
                    ‘type’, have ‘exceptional’ (error_mark) in
                    match_builtin_function_types
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anbu1024.me at gmail dot com
  Target Milestone: ---

$ cat test.c 

void __builtin_abort ( int x [__builtin_vis_fpcmpeq8shl ]) ; 

-------------------------------------------------------------------------------

$ gcc-snapshot11 --version
gcc (GCC) 11.0.0 20200802 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-------------------------------------------------------------------------------

$ gcc-snapshot11 test.c 
test.c:2:31: error: ‘__builtin_vis_fpcmpeq8shl’ undeclared here (not in a
function); did you mean ‘__builtin_ia32_cmpeqps’?
    2 | void __builtin_abort ( int x [__builtin_vis_fpcmpeq8shl ]) ;
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                               __builtin_ia32_cmpeqps
test.c:2:1: internal compiler error: tree check: expected class ‘type’, have
‘exceptional’ (error_mark) in match_builtin_function_types, at c/c-decl.c:1715
    2 | void __builtin_abort ( int x [__builtin_vis_fpcmpeq8shl ]) ;
      | ^~~~
0x73c1e2 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc-11-20200802/gcc/tree.c:9737
0x5f3a13 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        ../../gcc-11-20200802/gcc/tree.h:3426
0x5f3a13 match_builtin_function_types
        ../../gcc-11-20200802/gcc/c/c-decl.c:1715
0x5f3a13 diagnose_mismatched_decls
        ../../gcc-11-20200802/gcc/c/c-decl.c:1994
0x7ed0e4 duplicate_decls
        ../../gcc-11-20200802/gcc/c/c-decl.c:2936
0x7efab9 pushdecl(tree_node*)
        ../../gcc-11-20200802/gcc/c/c-decl.c:3129
0x80226e start_decl(c_declarator*, c_declspecs*, bool, tree_node*)
        ../../gcc-11-20200802/gcc/c/c-decl.c:5201
0x85cccc c_parser_declaration_or_fndef
        ../../gcc-11-20200802/gcc/c/c-parser.c:2299
0x866893 c_parser_external_declaration
        ../../gcc-11-20200802/gcc/c/c-parser.c:1773
0x867389 c_parser_translation_unit
        ../../gcc-11-20200802/gcc/c/c-parser.c:1646
0x867389 c_parse_file()
        ../../gcc-11-20200802/gcc/c/c-parser.c:21812
0x8c020d c_common_parse_file()
        ../../gcc-11-20200802/gcc/c-family/c-opts.c:1188
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

-------------------------------------------------------------------------------

$ gcc-snapshot10 --version 
gcc (GCC) 10.2.1 20200725
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-------------------------------------------------------------------------------

$ gcc-snapshot10 test.c 
test.c:2:31: error: ‘__builtin_vis_fpcmpeq8shl’ undeclared here (not in a
function); did you mean ‘__builtin_ia32_cmpeqps’?
    2 | void __builtin_abort ( int x [__builtin_vis_fpcmpeq8shl ]) ;
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                               __builtin_ia32_cmpeqps
test.c:2:6: warning: conflicting types for built-in function ‘__builtin_abort’;
expected ‘void(void)’
[]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wbuiltin-declaration-mismatch-Wbuiltin-declaration-mismatch]8;;]
    2 | void __builtin_abort ( int x [__builtin_vis_fpcmpeq8shl ]) ;
      |      ^~~~~~~~~~~~~~~
test.c:1:1: note: ‘__builtin_abort’ is declared in header ‘<stdlib.h>’
  +++ |+#include <stdlib.h>
    1 |

Reply via email to