diff options
author | Richard Guenther <rguenther@suse.de> | 2009-10-28 14:48:34 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-10-28 14:48:34 +0000 |
commit | cfee9aa4c9b3ea9265b595be3473d0a15319d862 (patch) | |
tree | 92b4e098e2f8daedf3f56de7f2fff165e4d72720 /gcc/gimple.c | |
parent | a1c6569544feb45d1fffff211a7970a8069d8c34 (diff) | |
download | gcc-cfee9aa4c9b3ea9265b595be3473d0a15319d862.zip gcc-cfee9aa4c9b3ea9265b595be3473d0a15319d862.tar.gz gcc-cfee9aa4c9b3ea9265b595be3473d0a15319d862.tar.bz2 |
re PR lto/41808 (error: non-trivial conversion at assignment)
2009-10-28 Richard Guenther <rguenther@suse.de>
PR lto/41808
PR lto/41839
* tree-ssa.c (useless_type_conversion_p): Do not treat
conversions to pointers to incomplete types as useless.
* gimple.c (gimple_types_compatible_p): Compare struct tags,
not typedef names.
* gcc.dg/lto/20091027-1_0.c: New testcase.
* gcc.dg/lto/20091027-1_1.c: Likewise.
* g++.dg/lto/20091026-1_0.C: Likewise.
* g++.dg/lto/20091026-1_1.C: Likewise.
* g++.dg/lto/20091026-1_a.h: Likewise.
From-SVN: r153671
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 1f80883..676e3fd 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -3368,7 +3368,8 @@ gimple_types_compatible_p (tree t1, tree t2) && RECORD_OR_UNION_TYPE_P (TREE_TYPE (t1)) && (!COMPLETE_TYPE_P (TREE_TYPE (t1)) || !COMPLETE_TYPE_P (TREE_TYPE (t2))) - && compare_type_names_p (TREE_TYPE (t1), TREE_TYPE (t2), true)) + && compare_type_names_p (TYPE_MAIN_VARIANT (TREE_TYPE (t1)), + TYPE_MAIN_VARIANT (TREE_TYPE (t2)), true)) { /* Replace the pointed-to incomplete type with the complete one. */ |