diff options
author | Martin Liska <mliska@suse.cz> | 2018-11-19 16:00:41 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-11-19 15:00:41 +0000 |
commit | f615cb162df6f026d7f8798a74f0241df43251b1 (patch) | |
tree | fc1e22c90dcdf5436ad0f5164e3bad31ae6dc0d9 /gcc/lto | |
parent | 4cb3570c8c453a830589b717d8519daa31ec7468 (diff) | |
download | gcc-f615cb162df6f026d7f8798a74f0241df43251b1.zip gcc-f615cb162df6f026d7f8798a74f0241df43251b1.tar.gz gcc-f615cb162df6f026d7f8798a74f0241df43251b1.tar.bz2 |
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
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lto/lto-symtab.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 4798663..4731e3f 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -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 diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 18437eb..d018a16 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -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; |