On Thu, 29 Nov 2018 21:25:33 +0000 Joseph Myers <jos...@codesourcery.com> wrote:
> On Thu, 29 Nov 2018, Julian Brown wrote: > > > On Thu, 20 Sep 2018 10:08:51 -0700 > > Cesar Philippidis <ce...@codesourcery.com> wrote: > > > > > Apparently, Tom ran into an ICE when we were adding support for > > > new clauses back in the gomp-4_0-branch days. This patch > > > shouldn't be necessary because all of the clauses are fully > > > implemented now, but it may prevent similar bugs from occurring > > > in the future at least during development. > > > > > > Is this patch OK for trunk? I bootstrapped and regtested it for > > > x86_64 Linux with nvptx offloading. > > > > Joseph, could you take a look at this please? > > Lots of other places in the same function use gcc_unreachable (). I > think using gcc_unreachable () here as well would be more appropriate > than special-casing this one place in this function to use "unknown". How's this? (Obvious, but re-tested anyway.) Thanks, Julian ChangeLog gcc/ * tree-pretty-print.c (dump_omp_clause): Make default case gcc_unreachable.
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 99eca4a..0861cc9 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -1180,9 +1180,7 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, dump_flags_t flags) break; default: - /* Should never happen. */ - dump_generic_node (pp, clause, spc, flags, false); - break; + gcc_unreachable (); } }