[Bug bootstrap/85571] [9 Regression] non-bootstrap-debug miscompare with trunk
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 30 12:31:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85571
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
On the gcc-8 branch cc1 and friends compare OK so this is a recent regression.
Will try with checking enabled to be extra sure. Then there are only few
changes on trunk that are suspicious.
+/* Compare types based on source file location. */
+
+static int
+cmp_type_location (const void *p1_, const void *p2_)
+{
+ tree *p1 = (tree*)(const_cast<void *>(p1_));
+ tree *p2 = (tree*)(const_cast<void *>(p2_));
+ if (*p1 == *p2)
+ return 0;
+
+ tree tname1 = TYPE_NAME (*p1);
+ tree tname2 = TYPE_NAME (*p2);
+
+ const char *f1 = DECL_SOURCE_FILE (tname1);
+ const char *f2 = DECL_SOURCE_FILE (tname2);
+
+ int r = strcmp (f1, f2);
+ if (r == 0)
this should probably split paths.
+ /* Register ODR types. */
+ for (unsigned i = 0; i < odr_types.length (); i++)
+ register_odr_type (odr_types[i]);
I suspect the order may have effects on code-generation.
More information about the Gcc-bugs
mailing list