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

            Bug ID: 89235
           Summary: ICE: tree check: expected block, have <invalid tree
                    code> in inlining_chain_to_json, at
                    optinfo-emit-json.cc:285
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openmp
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-pc-linux-gnu

Created attachment 45625
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45625&action=edit
Testcase

gcc-9.0.0-alpha20190203 snpashot (r268503) ICEs when compiling the attached
testcase w/ -O3 -fopenmp -fsave-optimization-record -ftree-parallelize-loops=2
-fno-tree-vectorize --param ggc-min-expand=0:

% x86_64-pc-linux-gnu-gcc-9.0.0-alpha20190203 -O3 -fopenmp
-fsave-optimization-record -ftree-parallelize-loops=2 -fno-tree-vectorize
--param ggc-min-expand=0 -c rsigehl9.c
during GIMPLE pass: parloops
rsigehl9.c: In function 'hl.simdclone.1':
rsigehl9.c:39:1: internal compiler error: tree check: expected block, have
<invalid tree code> in inlining_chain_to_json, at optinfo-emit-json.cc:285
   39 | hl (void)
      | ^~
0x702b73 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree.c:9813
0x67319f tree_check(tree_node*, char const*, int, char const*, tree_code)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree.h:3176
0x67319f optrecord_json_writer::inlining_chain_to_json(unsigned int)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/optinfo-emit-json.cc:285
0xc777ba optrecord_json_writer::optinfo_to_json(optinfo const*)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/optinfo-emit-json.cc:419
0xc777e8 optrecord_json_writer::add_record(optinfo const*)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/optinfo-emit-json.cc:141
0x98b9c2 dump_context::emit_optinfo(optinfo const*)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/dumpfile.c:1207
0x98b9c2 dump_context::end_any_optinfo()
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/dumpfile.c:1193
0x98e0bf dump_context::begin_scope(char const*, dump_user_location_t const&,
dump_impl_location_t const&)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/dumpfile.c:1132
0xfc71f3 auto_dump_scope::auto_dump_scope(char const*, dump_user_location_t
const&, dump_impl_location_t const&)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/dumpfile.h:609
0xfc71f3 vect_analyze_loop_form_1(loop*, gcond**, tree_node**, tree_node**,
tree_node**, gcond**)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree-vect-loop.c:1156
0xfc79e4 vect_analyze_loop_form(loop*, vec_info_shared*)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree-vect-loop.c:1312
0xe21c25 gather_scalar_reductions
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree-parloops.c:2599
0xe2629b try_create_reduction_list
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree-parloops.c:2784
0xe2629b parallelize_loops
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree-parloops.c:3391
0xe27c9d execute
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree-parloops.c:3505
0xe27c9d execute
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree-parloops.c:3484

Reply via email to