public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/104506] New: [12 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:87 on invalid symbol redeclaration
@ 2022-02-11 16:49 zsojka at seznam dot cz
  2022-02-11 18:22 ` [Bug c/104506] " pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2022-02-11 16:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104506
           Summary: [12 Regression] ICE: tree check: expected class
                    'type', have 'exceptional' (error_mark) in
                    useless_type_conversion_p, at gimple-expr.cc:87 on
                    invalid symbol redeclaration
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          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: x86_64-pc-linux-gnu

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

Compiler output:
$ x86_64-pc-linux-gnu-gcc testcase.c
testcase.c: In function 'foo':
testcase.c:5:7: error: 'x' redeclared as different kind of symbol
    5 |   int x;
      |       ^
testcase.c:2:13: note: previous definition of 'x' with type 'double'
    2 | foo (double x)
      |      ~~~~~~~^
testcase.c:4:3: internal compiler error: tree check: expected class 'type',
have 'exceptional' (error_mark) in useless_type_conversion_p, at
gimple-expr.cc:87
    4 |   x;
      |   ^
0x7f8b57 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        /repo/gcc-trunk/gcc/tree.cc:8738
0x6e607c tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        /repo/gcc-trunk/gcc/tree.h:3568
0x6e607c useless_type_conversion_p(tree_node*, tree_node*)
        /repo/gcc-trunk/gcc/gimple-expr.cc:87
0x15d565b tree_ssa_strip_useless_type_conversions(tree_node*)
        /repo/gcc-trunk/gcc/tree-ssa.cc:1280
0x107f937 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /repo/gcc-trunk/gcc/gimplify.cc:14875
0x10841a6 gimplify_stmt(tree_node**, gimple**)
        /repo/gcc-trunk/gcc/gimplify.cc:7035
0x1081cf3 gimplify_statement_list
        /repo/gcc-trunk/gcc/gimplify.cc:2022
0x1081cf3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /repo/gcc-trunk/gcc/gimplify.cc:15425
0x10841a6 gimplify_stmt(tree_node**, gimple**)
        /repo/gcc-trunk/gcc/gimplify.cc:7035
0x10848fd gimplify_bind_expr
        /repo/gcc-trunk/gcc/gimplify.cc:1427
0x1080e62 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /repo/gcc-trunk/gcc/gimplify.cc:15181
0x10923df gimplify_stmt(tree_node**, gimple**)
        /repo/gcc-trunk/gcc/gimplify.cc:7035
0x10923df gimplify_body(tree_node*, bool)
        /repo/gcc-trunk/gcc/gimplify.cc:16226
0x109280d gimplify_function_tree(tree_node*)
        /repo/gcc-trunk/gcc/gimplify.cc:16380
0xeb6807 cgraph_node::analyze()
        /repo/gcc-trunk/gcc/cgraphunit.cc:675
0xeb9477 analyze_functions
        /repo/gcc-trunk/gcc/cgraphunit.cc:1240
0xeba11d symbol_table::finalize_compilation_unit()
        /repo/gcc-trunk/gcc/cgraphunit.cc:2500
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.

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

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

end of thread, other threads:[~2022-02-21  9:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 16:49 [Bug c/104506] New: [12 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:87 on invalid symbol redeclaration zsojka at seznam dot cz
2022-02-11 18:22 ` [Bug c/104506] " pinskia at gcc dot gnu.org
2022-02-11 18:24 ` pinskia at gcc dot gnu.org
2022-02-11 21:48 ` pinskia at gcc dot gnu.org
2022-02-11 21:50 ` pinskia at gcc dot gnu.org
2022-02-11 22:57 ` pinskia at gcc dot gnu.org
2022-02-11 23:01 ` pinskia at gcc dot gnu.org
2022-02-14  8:32 ` rguenth at gcc dot gnu.org
2022-02-14 11:11 ` jakub at gcc dot gnu.org
2022-02-18 21:41 ` pinskia at gcc dot gnu.org
2022-02-21  9:06 ` cvs-commit at gcc dot gnu.org
2022-02-21  9:07 ` 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).