https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90134
Bug ID: 90134 Summary: ICE in duplicate_eh_regions_1, at except.c:557 Product: gcc Version: 9.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, openmp Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- g++-9.0.0-alpha20190414 snapshot (r270355), 8.3, 7.4, 6.3 all ICE when compiling the following testcase w/ -O1 (-O2, -O3, -Ofast) -fnon-call-exceptions -ftree-parallelize-loops=2 --param max-loop-header-insns=1 (the last --param is not needed for gcc 6.3): void ot (); struct xv { int te; }; class m7 { public: ~m7 () { for (int za = qr; za < 1; ++za) { xv *fq; if (fq->te == 0) ; } try { ot (); } catch (...) { } } private: int qr; }; m7 n1; % g++-9.0.0-alpha20190414 -O1 -fnon-call-exceptions -ftree-parallelize-loops=2 --param max-loop-header-insns=1 -c tfl5v9ir.cc during GIMPLE pass: ompexpssa tfl5v9ir.cc: In function 'm7___m7._loopfn.0': tfl5v9ir.cc:12:26: internal compiler error: in duplicate_eh_regions_1, at except.c:557 12 | for (int za = qr; za < 1; ++za) | ~~~^~~ 0x6b4497 duplicate_eh_regions_1 /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190414/work/gcc-9-20190414/gcc/except.c:557 0xc29281 duplicate_eh_regions_1 /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190414/work/gcc-9-20190414/gcc/except.c:599 0xc29784 duplicate_eh_regions(function*, eh_region_d*, int, tree_node* (*)(tree_node*, void*), void*) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190414/work/gcc-9-20190414/gcc/except.c:628 0xfc4bc1 move_sese_region_to_fn(function*, basic_block_def*, basic_block_def*, tree_node*) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190414/work/gcc-9-20190414/gcc/tree-cfg.c:7509 0xe4ab0c expand_omp_taskreg /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190414/work/gcc-9-20190414/gcc/omp-expand.c:1427 0xe51237 expand_omp_synch /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190414/work/gcc-9-20190414/gcc/omp-expand.c:6344 0xe51237 expand_omp /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190414/work/gcc-9-20190414/gcc/omp-expand.c:8189 0xe5305d execute_expand_omp /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190414/work/gcc-9-20190414/gcc/omp-expand.c:8381