compiler: add break label in 1,2-case select statement lowering
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 10 Jul 2019 17:56:40 +0000 (17:56 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 10 Jul 2019 17:56:40 +0000 (17:56 +0000)
commit41112d9519d48a503864a157d90fd3c6ef974bfe
tree428f83007d8eb2564561333bb23809f32a8f7b41
parentb59ff58620d1d4ffff5c74bd9f9f10f3cb222d8e
compiler: add break label in 1,2-case select statement lowering

    CL 184998 added optimizations for one- and two-case select
    statements. But it didn't handle break statement in the select
    case correctly. Specifically, it didn't add the label definition,
    so it could result in a dangling goto. This CL fixes this, by
    adding the label definition.

    A test case is CL 185520.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/185519

From-SVN: r273359
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/statements.cc