public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/109619] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in fold_const_call_1, at fold-const-call.cc
@ 2023-04-25  5:54 anbu1024.me at gmail dot com
  2023-04-25  6:38 ` [Bug c/109619] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: anbu1024.me at gmail dot com @ 2023-04-25  5:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109619
           Summary: ICE: tree check: expected class ‘type’, have
                    ‘exceptional’ (error_mark) in fold_const_call_1, at
                    fold-const-call.cc
           Product: gcc
           Version: 13.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: ---

$ gcc --version
gcc (GCC) 13.0.1 20230219 (experimental)
Copyright (C) 2023 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.

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

$ cat 4.c 

void foo(void *a1, const void *a2, long unsigned int a3)
{
  void *x = __builtin_memcpy(a1, a2, a3);
  int *a3 = __builtin_memmove(a1, a2, a3);
}

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

$ gcc 4.c 
4.c: In function ‘foo’:
4.c:5:8: error: ‘a3’ redeclared as different kind of symbol
    5 |   int *a3 = __builtin_memmove(a1, a2, a3);
      |        ^~
4.c:2:54: note: previous definition of ‘a3’ with type ‘long unsigned int’
    2 | void foo(void *a1, const void *a2, long unsigned int a3)
      |                                    ~~~~~~~~~~~~~~~~~~^~
4.c:4:13: internal compiler error: tree check: expected class ‘type’, have
‘exceptional’ (error_mark) in fold_const_call_1, at fold-const-call.cc:1800
    4 |   void *x = __builtin_memcpy(a1, a2, a3);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x840637 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc-13-20230219/gcc/tree.cc:8959
0x776846 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        ../../gcc-13-20230219/gcc/tree.h:3653
0x776846 fold_const_call_1
        ../../gcc-13-20230219/gcc/fold-const-call.cc:1800
0x776846 fold_const_call(combined_fn, tree_node*, tree_node*, tree_node*,
tree_node*)
        ../../gcc-13-20230219/gcc/fold-const-call.cc:1903
0xa66a98 fold_builtin_3
        ../../gcc-13-20230219/gcc/builtins.cc:9851
0xa66a98 fold_builtin_n
        ../../gcc-13-20230219/gcc/builtins.cc:9932
0xc97037 gimplify_call_expr
        ../../gcc-13-20230219/gcc/gimplify.cc:3684
0xc88500 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-13-20230219/gcc/gimplify.cc:16333
0xc9a465 gimplify_modify_expr
        ../../gcc-13-20230219/gcc/gimplify.cc:6153
0xc879e1 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-13-20230219/gcc/gimplify.cc:16361
0xc8a316 gimplify_stmt(tree_node**, gimple**)
        ../../gcc-13-20230219/gcc/gimplify.cc:7219
0xc97d34 gimplify_and_add(tree_node*, gimple**)
        ../../gcc-13-20230219/gcc/gimplify.cc:492
0xc97d34 gimplify_decl_expr
        ../../gcc-13-20230219/gcc/gimplify.cc:1936
0xc88132 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-13-20230219/gcc/gimplify.cc:16558
0xc8a316 gimplify_stmt(tree_node**, gimple**)
        ../../gcc-13-20230219/gcc/gimplify.cc:7219
0xc88c38 gimplify_statement_list
        ../../gcc-13-20230219/gcc/gimplify.cc:2019
0xc88c38 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-13-20230219/gcc/gimplify.cc:16806
0xc8a316 gimplify_stmt(tree_node**, gimple**)
        ../../gcc-13-20230219/gcc/gimplify.cc:7219
0xc8aa47 gimplify_bind_expr
        ../../gcc-13-20230219/gcc/gimplify.cc:1430
0xc87c95 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-13-20230219/gcc/gimplify.cc:16562
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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-03-22  9:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25  5:54 [Bug c/109619] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in fold_const_call_1, at fold-const-call.cc anbu1024.me at gmail dot com
2023-04-25  6:38 ` [Bug c/109619] " rguenth at gcc dot gnu.org
2023-04-27  6:58 ` marxin at gcc dot gnu.org
2024-03-08  4:04 ` pinskia at gcc dot gnu.org
2024-03-21 22:19 ` [Bug c/109619] [12/13/14 Regression] " pinskia at gcc dot gnu.org
2024-03-21 22:19 ` [Bug c/109619] [12/13/14 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in fold_const_call_1, at fold-const-call.cc after r12-3278-g823685221de986 pinskia at gcc dot gnu.org
2024-03-22  4:19 ` pinskia at gcc dot gnu.org
2024-03-22  9:20 ` cvs-commit at gcc dot gnu.org
2024-03-22  9:20 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).