[hsa] Avoid segfault in hsa switch expansion
authorMartin Jambor <mjambor@suse.cz>
Mon, 23 May 2016 11:45:13 +0000 (13:45 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Mon, 23 May 2016 11:45:13 +0000 (13:45 +0200)
commita50575432b41b3bc3b0a14cb2e6e53881941a99f
treef960a48373fb98e3c858fff7a8c978dc5d1c6c7e
parente569db5fb5fece9f9a3ee09e3dc7c58f0db36e40
[hsa] Avoid segfault in hsa switch expansion

2016-05-23  Martin Jambor  <mjambor@suse.cz>

* hsa-gen.c (gen_hsa_insns_for_switch_stmt): Create an empty
default block if a PHI node in the original one would be resized.

libgomp/
* testsuite/libgomp.hsa.c/switch-sbr-2.c: New test.

From-SVN: r236585
gcc/ChangeLog
gcc/hsa-gen.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.hsa.c/switch-sbr-2.c [new file with mode: 0644]