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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, if you want something that works well with wide range of GCCs, then your
        case OMP_CLAUSE_TILE:
          /* OpenACC tile clauses are discarded during gimplification, so we
             don't expect to see anything here.  */
          gcc_unreachable ();

        case OMP_CLAUSE__CACHE_:
          /* These clauses belong to the OpenACC cache directive, which is
             discarded during gimplification, so we don't expect to see
             anything here.  */
          gcc_unreachable ();

        default:
          gcc_unreachable ();
is bad, while:
          /* OpenACC tile clauses are discarded during gimplification, so we
             don't expect to see anything here.  */
        case OMP_CLAUSE_TILE:
          /* These clauses belong to the OpenACC cache directive, which is
             discarded during gimplification, so we don't expect to see
             anything here.  */
        case OMP_CLAUSE__CACHE_:
        default:
          gcc_unreachable ();
is optimized well.  The latter is optimized in GIMPLE_SWITCH during the cfg
pass.  Let me file a PR for the other form (though, in this case, having a
separate gcc_unreachable () in each case is IMHO also much uglier than just
listing it next to default.

Reply via email to