In 'gcc/omp-oacc-kernels-decompose.cc:flatten_binds', don't choke on empty GIMPLE...
authorThomas Schwinge <thomas@codesourcery.com>
Fri, 27 Nov 2020 10:54:50 +0000 (11:54 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 27 Nov 2020 13:38:15 +0000 (14:38 +0100)
commit4b5726fda653d11f882fb9a112e4cffa12f7ed61
tree552e90940bde5f9f48f1a2ac848ae66abe13b242
parent4a7c7999086756b9d630ed6036eb7fdce69bb5cd
In 'gcc/omp-oacc-kernels-decompose.cc:flatten_binds', don't choke on empty GIMPLE sequence

Also, instead of just examining the first statement of inner 'GIMPLE_BIND' (via
'inner_sequence' being a 'typedef gimple *gimple_seq'), in fact examine all
statements contained therein, which I suppose must've been the intention here.

This "fixes" the testcase 'c-c++-common/goacc/kernels-decompose-ice-2.c' (which
now runs into the same ICE as 'c-c++-common/goacc/kernels-decompose-ice-1.c',
etc.).

gcc/
* omp-oacc-kernels-decompose.cc (flatten_binds): Don't choke on
empty GIMPLE sequence, and examine all statements contained in
inner 'GIMPLE_BIND'.
gcc/testsuite/
* c-c++-common/goacc/kernels-decompose-ice-1.c: Adjust.
* c-c++-common/goacc/kernels-decompose-ice-2.c: Likewise.
gcc/omp-oacc-kernels-decompose.cc
gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c
gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c