]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/65531 (ICE: symtab_node::verify failed: Two symbols with same comdat_gro...
authorJan Hubicka <hubicka@ucw.cz>
Fri, 27 Mar 2015 15:19:35 +0000 (16:19 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 27 Mar 2015 15:19:35 +0000 (15:19 +0000)
PR target/65531
* symtab.c (symtab_node::verify_symtab_nodes): Fix verification of
comdat groups.

From-SVN: r221736

gcc/ChangeLog
gcc/symtab.c

index 0f0a6f5a83e725510c4833f177b66eb74df907f9..e846805ed988cf034e416afc3bf4d3db438e20e8 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-27  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR target/65531
+       * symtab.c (symtab_node::verify_symtab_nodes): Fix verification of
+       comdat groups.
+
 2015-03-27  Jan Hubicka  <hubicka@ucw.cz>
 
        PR ipa/65600
index 88e168bd193086048b51cd38b8578364c4f8951d..84a0981fab0796bde3c24f00ec8cf245349edded 100644 (file)
@@ -1130,15 +1130,20 @@ symtab_node::verify_symtab_nodes (void)
                                                  &existed);
          if (!existed)
            *entry = node;
-         else
-           for (s = (*entry)->same_comdat_group; s != NULL && s != node; s = s->same_comdat_group)
+         else if (!DECL_EXTERNAL (node->decl))
+           {
+             for (s = (*entry)->same_comdat_group; s != NULL && s != node;
+                  s = s->same_comdat_group)
+               ;
              if (!s || s == *entry)
                {
-                 error ("Two symbols with same comdat_group are not linked by the same_comdat_group list.");
+                 error ("Two symbols with same comdat_group are not linked by "
+                        "the same_comdat_group list.");
                  (*entry)->debug ();
                  node->debug ();
                  internal_error ("symtab_node::verify failed");
                }
+           }
        }
     }
 }