X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fcgraphunit.c;h=51b4732b45ad4135ccdbb580e85bfbf487d36f10;hp=fcb96b2044c1c965a3373b3d18b5e9459ccc8299;hb=6afe7e8c55466d4d8e4d8f73a6dff7f845d4baf4;hpb=bae4ea6c12be9b2daa3f8f81af1a65a150b2c369 diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index fcb96b2044c..51b4732b45a 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -714,6 +714,32 @@ verify_cgraph_node (struct cgraph_node *node) error ("double linked list of clones corrupted"); error_found = true; } + if (node->same_comdat_group) + { + struct cgraph_node *n = node->same_comdat_group; + + if (!DECL_ONE_ONLY (node->decl)) + { + error ("non-DECL_ONE_ONLY node in a same_comdat_group list"); + error_found = true; + } + if (n == node) + { + error ("node is alone in a comdat group"); + error_found = true; + } + do + { + if (!n->same_comdat_group) + { + error ("same_comdat_group is not a circular list"); + error_found = true; + break; + } + n = n->same_comdat_group; + } + while (n != node); + } if (node->analyzed && gimple_has_body_p (node->decl) && !TREE_ASM_WRITTEN (node->decl)