[Bug debug/105415] [9/10/11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftree-parallelize-loops=2 since r7-4900-g59ec925b1199f9

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 28 11:51:33 GMT 2022


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I've included debug printouts into the if (x_node == NULL) body before return
0;
and sort -u of the dump shows in powerpc64le-linux bootstrap so far (still
ongoing) shows:
../../gcc/fortran/decl.cc match_attr_spec *.LC320
../../gcc/fortran/decl.cc match_attr_spec *.LC455
../../gcc/fortran/decl.cc match_attr_spec *.LC456
../../gcc/fortran/decl.cc match_attr_spec *.LC457
../../gcc/fortran/decl.cc match_attr_spec *.LC458
../../gcc/fortran/decl.cc match_attr_spec *.LC459
../../gcc/fortran/decl.cc match_attr_spec *.LC460
../../gcc/fortran/decl.cc match_attr_spec *.LC461
../../gcc/fortran/decl.cc match_attr_spec *.LC462
../../gcc/fortran/decl.cc match_attr_spec *.LC463
../../gcc/fortran/decl.cc match_attr_spec *.LC464
../../gcc/fortran/decl.cc match_attr_spec *.LC465
../../gcc/fortran/decl.cc match_attr_spec *.LC466
../../gcc/fortran/decl.cc match_attr_spec *.LC467
../../gcc/fortran/decl.cc match_attr_spec *.LC468
../../gcc/fortran/decl.cc match_attr_spec *.LC469
../../gcc/fortran/decl.cc match_attr_spec *.LC470
../../gcc/fortran/decl.cc match_attr_spec *.LC471
../../gcc/fortran/decl.cc match_attr_spec *.LC472
../../gcc/fortran/decl.cc match_attr_spec *.LC473
../../gcc/fortran/decl.cc match_attr_spec *.LC474
../../gcc/fortran/decl.cc match_attr_spec *.LC475
../../gcc/fortran/decl.cc match_attr_spec *.LC476
../../gcc/fortran/parse.cc next_statement *.LC704
../../gcc/fortran/scanner.cc gfc_next_char_literal *.LC52
../../gcc/fortran/scanner.cc gfc_next_char_literal *.LC53
../../gcc/fortran/scanner.cc gfc_next_char_literal *.LC57
../../gcc/fortran/scanner.cc load_file *.LC102
so seems decls without varpool nodes are mostly constant pool decls.
So perhaps
--- gcc/alias.cc.jj     2022-04-28 12:33:15.169434009 +0200
+++ gcc/alias.cc        2022-04-28 13:47:34.402456905 +0200
@@ -2219,12 +2219,19 @@ compare_base_symbol_refs (const_rtx x_ba
          || (!TREE_STATIC (x_decl) && !TREE_PUBLIC (x_decl)))
        return 0;

-      symtab_node *x_node = symtab_node::get_create (x_decl)
-                           ->ultimate_alias_target ();
-      /* External variable cannot be in section anchor.  */
-      if (!x_node->definition)
+      symtab_node *x_node = symtab_node::get (x_decl);
+      tree x_decl2 = x_decl;
+      if (x_node != NULL)
+       {
+         x_node = x_node->ultimate_alias_target ();
+         /* External variable cannot be in section anchor.  */
+         if (!x_node->definition)
+           return 0;
+         x_decl2 = x_node->decl;
+       }
+      else if (DECL_EXTERNAL (x_decl))
        return 0;
-      x_base = XEXP (DECL_RTL (x_node->decl), 0);
+      x_base = XEXP (DECL_RTL (x_decl2), 0);
       /* If not in anchor, we can disambiguate.  */
       if (!SYMBOL_REF_HAS_BLOCK_INFO_P (x_base))
        return 0;
might be better.


More information about the Gcc-bugs mailing list