The previous "not for committing" taxonomy patch shows that the path
handling "extra nodes" in build_struct_comp_nodes is probably now dead,
at least across the current testsuite.  This patch adds gcc_unreachable
on that path: this passes testing, which suggests that the extra node
handling can probably be removed completely.  (Otherwise we need test
coverage for that path, ideally!)

This is mostly posted as an FYI: a real patch would probably just remove
the unused code path, if it really isn't needed any more.

Thanks,

Julian

2021-09-29  Julian Brown  <jul...@codesourcery.com>

gcc/
        * gimplify.c (build_struct_comp_nodes): Add gcc_unreachable on code
        path that appears to now be unused.
---
 gcc/gimplify.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index d9fda21413d..3d444d1836f 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -8625,6 +8625,9 @@ build_struct_comp_nodes (enum tree_code code, tree 
grp_start, tree grp_end,
       OMP_CLAUSE_SIZE (c3) = TYPE_SIZE_UNIT (ptr_type_node);
       OMP_CLAUSE_CHAIN (c3) = NULL_TREE;
 
+      /* Apparently?  */
+      gcc_unreachable ();
+
       *extra_node = c3;
     }
   else
-- 
2.29.2

Reply via email to