Fix condition in lto-symtab.c (PR lto/88077).

2018-11-19  Martin Liska  <mliska@suse.cz>

	PR lto/88077
	* lto-symtab.c (lto_symtab_merge): Transform the
	condition before r256989.
2018-11-19  Martin Liska  <mliska@suse.cz>

	PR lto/88077
	* gcc.dg/lto/pr88077_0.c: New test.
	* gcc.dg/lto/pr88077_1.c: New test.

From-SVN: r266277
This commit is contained in:
Martin Liska 2018-11-19 16:00:41 +01:00 committed by Martin Liska
parent 4cb3570c8c
commit f615cb162d
5 changed files with 24 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2018-11-19 Martin Liska <mliska@suse.cz>
PR lto/88077
* lto-symtab.c (lto_symtab_merge): Transform the
condition before r256989.
2018-11-16 Martin Liska <mliska@suse.cz>
PR lto/88004

View File

@ -374,8 +374,9 @@ lto_symtab_merge (symtab_node *prevailing, symtab_node *entry)
int a[]={1,2,3};
here the first declaration is COMMON
and sizeof(a) == sizeof (int). */
else if (TREE_CODE (type) == ARRAY_TYPE)
return (TYPE_SIZE (decl) == TYPE_SIZE (TREE_TYPE (type)));
else if (TREE_CODE (type) != ARRAY_TYPE
|| (TYPE_SIZE (type) != TYPE_SIZE (TREE_TYPE (type))))
return false;
}
return true;

View File

@ -17,6 +17,12 @@
PR lto/87229
* g++.dg/lto/pr87229_0.C: New testcase.
2018-11-19 Martin Liska <mliska@suse.cz>
PR lto/88077
* gcc.dg/lto/pr88077_0.c: New test.
* gcc.dg/lto/pr88077_1.c: New test.
2018-11-19 Martin Liska <mliska@suse.cz>
* g++.dg/gcov/pr84548.C: Remove remove-gcda.

View File

@ -0,0 +1,3 @@
/* { dg-lto-do link } */
int HeaderStr;

View File

@ -0,0 +1,6 @@
char HeaderStr[1];
int main()
{
return 0;
}