aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-09-01 13:56:13 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-09-01 13:56:13 +0200
commitd1e2e50a5f4d077eab6d3c93047203d15f16b324 (patch)
tree6824c2194a8ff042cc8558a56c5bdb7e1db21e96 /gcc/tree.c
parent12b19f6aaf6a93be0bdc80e3d17540b94c58e157 (diff)
downloadgcc-d1e2e50a5f4d077eab6d3c93047203d15f16b324.zip
gcc-d1e2e50a5f4d077eab6d3c93047203d15f16b324.tar.gz
gcc-d1e2e50a5f4d077eab6d3c93047203d15f16b324.tar.bz2
re PR lto/91572 (lto1: error: type variant has different ‘TREE_TYPE’ since r269862)
PR lto/91572 * tree.c (find_decls_types_in_node): Also walk TREE_PURPOSE of GIMPLE_ASM TREE_LIST operands. * g++.dg/lto/pr91572_0.C: New test. From-SVN: r275266
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 613efa5..afd7020 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -6142,6 +6142,13 @@ find_decls_types_in_node (struct cgraph_node *n, class free_lang_data_d *fld)
{
tree arg = gimple_op (stmt, i);
find_decls_types (arg, fld);
+ /* find_decls_types doesn't walk TREE_PURPOSE of TREE_LISTs,
+ which we need for asm stmts. */
+ if (arg
+ && TREE_CODE (arg) == TREE_LIST
+ && TREE_PURPOSE (arg)
+ && gimple_code (stmt) == GIMPLE_ASM)
+ find_decls_types (TREE_PURPOSE (arg), fld);
}
}
}