Commit ee034d31 by Eric Botcazou Committed by Eric Botcazou

re PR lto/83954 (LTO: Bogus -Wlto-type-mismatch warning for array of pointer to incomplete type)

	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
parent aa81b142
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> 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
PR lto/83954 PR lto/83954
......
...@@ -288,9 +288,12 @@ warn_type_compatibility_p (tree prevailing_type, tree type, ...@@ -288,9 +288,12 @@ warn_type_compatibility_p (tree prevailing_type, tree type,
{ {
tree t1 = type, t2 = prevailing_type; tree t1 = type, t2 = prevailing_type;
/* Alias sets of arrays are the same as alias sets of the inner /* Alias sets of arrays with aliased components are the same as alias
types. */ sets of the inner types. */
while (TREE_CODE (t1) == ARRAY_TYPE && TREE_CODE (t2) == ARRAY_TYPE) while (TREE_CODE (t1) == ARRAY_TYPE
&& !TYPE_NONALIASED_COMPONENT (t1)
&& TREE_CODE (t2) == ARRAY_TYPE
&& !TYPE_NONALIASED_COMPONENT (t2))
{ {
t1 = TREE_TYPE (t1); t1 = TREE_TYPE (t1);
t2 = TREE_TYPE (t2); t2 = TREE_TYPE (t2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment