PR lto/83954
* lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
component type of array types with non-aliased component.
From-SVN: r257343
+2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR lto/83954
+ * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
+ component type of array types with non-aliased component.
+
2018-01-30 Jan Hubicka <hubicka@ucw.cz>
PR lto/83954
{
tree t1 = type, t2 = prevailing_type;
- /* Alias sets of arrays are the same as alias sets of the inner
- types. */
- while (TREE_CODE (t1) == ARRAY_TYPE && TREE_CODE (t2) == ARRAY_TYPE)
+ /* Alias sets of arrays with aliased components are the same as alias
+ sets of the inner types. */
+ while (TREE_CODE (t1) == ARRAY_TYPE
+ && !TYPE_NONALIASED_COMPONENT (t1)
+ && TREE_CODE (t2) == ARRAY_TYPE
+ && !TYPE_NONALIASED_COMPONENT (t2))
{
t1 = TREE_TYPE (t1);
t2 = TREE_TYPE (t2);