public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/101196] New: [12 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p
@ 2021-06-24 13:54 anbu1024.me at gmail dot com
  2021-06-25  6:54 ` [Bug c/101196] " marxin at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: anbu1024.me at gmail dot com @ 2021-06-24 13:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101196
           Summary: [12 Regression] ICE: tree check: expected class
                    ‘type’, have ‘exceptional’ (error_mark) in
                    useless_type_conversion_p
           Product: gcc
           Version: 12.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 37.c 

extern int var[16];

void foo(int [x]);

void bar(void)
{
  void foo(int array[]);
}

void baz(void)
{
  foo(var);
}

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

$ gcc-sp12 --version
gcc (GCC) 12.0.0 20210620 (experimental)
Copyright (C) 2021 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-sp12 37.c 
37.c:4:15: error: ‘x’ undeclared here (not in a function)
    4 | void foo(int [x]);
      |               ^
37.c: In function ‘baz’:
37.c:13:7: error: type of formal parameter 1 is incomplete
   13 |   foo(var);
      |       ^~~
37.c:13:3: internal compiler error: tree check: expected class ‘type’, have
‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:259
   13 |   foo(var);
      |   ^~~
0x7a313c tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc-12-20210620/gcc/tree.c:8734
0x6d5d8a tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        ../../gcc-12-20210620/gcc/tree.h:3494
0x6d5d8a useless_type_conversion_p(tree_node*, tree_node*)
        ../../gcc-12-20210620/gcc/gimple-expr.c:259
0xbc1108 types_compatible_p
        ../../gcc-12-20210620/gcc/gimple-expr.h:67
0xbc1108 gimplify_addr_expr
        ../../gcc-12-20210620/gcc/gimplify.c:6234
0xbb9384 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-12-20210620/gcc/gimplify.c:14141
0xbc4dc4 gimplify_call_expr
        ../../gcc-12-20210620/gcc/gimplify.c:3454
0xbbacd4 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-12-20210620/gcc/gimplify.c:14066
0xbbc9f6 gimplify_stmt(tree_node**, gimple**)
        ../../gcc-12-20210620/gcc/gimplify.c:6865
0xbbd14d gimplify_bind_expr
        ../../gcc-12-20210620/gcc/gimplify.c:1426
0xbbacee gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-12-20210620/gcc/gimplify.c:14295
0xbd2229 gimplify_stmt(tree_node**, gimple**)
        ../../gcc-12-20210620/gcc/gimplify.c:6865
0xbd2229 gimplify_body(tree_node*, bool)
        ../../gcc-12-20210620/gcc/gimplify.c:15339
0xbd266d gimplify_function_tree(tree_node*)
        ../../gcc-12-20210620/gcc/gimplify.c:15493
0xa10bf7 cgraph_node::analyze()
        ../../gcc-12-20210620/gcc/cgraphunit.c:670
0xa135f7 analyze_functions
        ../../gcc-12-20210620/gcc/cgraphunit.c:1234
0xa1428d symbol_table::finalize_compilation_unit()
        ../../gcc-12-20210620/gcc/cgraphunit.c:2508
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-sp11 --version
gcc (GCC) 11.1.1 20210619
Copyright (C) 2021 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-sp11 37.c 
37.c:4:15: error: ‘x’ undeclared here (not in a function)
    4 | void foo(int [x]);
      |               ^
37.c: In function ‘baz’:
37.c:13:7: error: type of formal parameter 1 is incomplete
   13 |   foo(var);
      |       ^~~

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

* [Bug c/101196] [12 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p
  2021-06-24 13:54 [Bug c/101196] New: [12 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p anbu1024.me at gmail dot com
@ 2021-06-25  6:54 ` marxin at gcc dot gnu.org
  2021-08-22  4:36 ` pinskia at gcc dot gnu.org
  2021-08-22  4:40 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-25  6:54 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-06-25
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1

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

* [Bug c/101196] [12 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p
  2021-06-24 13:54 [Bug c/101196] New: [12 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p anbu1024.me at gmail dot com
  2021-06-25  6:54 ` [Bug c/101196] " marxin at gcc dot gnu.org
@ 2021-08-22  4:36 ` pinskia at gcc dot gnu.org
  2021-08-22  4:40 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-22  4:36 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug c/101196] [12 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p
  2021-06-24 13:54 [Bug c/101196] New: [12 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p anbu1024.me at gmail dot com
  2021-06-25  6:54 ` [Bug c/101196] " marxin at gcc dot gnu.org
  2021-08-22  4:36 ` pinskia at gcc dot gnu.org
@ 2021-08-22  4:40 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-22  4:40 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 100532.

*** This bug has been marked as a duplicate of bug 100532 ***

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

end of thread, other threads:[~2021-08-22  4:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 13:54 [Bug c/101196] New: [12 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p anbu1024.me at gmail dot com
2021-06-25  6:54 ` [Bug c/101196] " marxin at gcc dot gnu.org
2021-08-22  4:36 ` pinskia at gcc dot gnu.org
2021-08-22  4:40 ` 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).