From 90dda0e9563ec83ddbf59bc8fce9f1c1c9d1a55b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 16 Jan 2012 12:12:53 +0100 Subject: re PR tree-optimization/51865 (ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2642) PR tree-optimization/51865 * tree-inline.c (tree_function_versioning): Call remap_decl on DECL_RESULT whenever it has VOID_TYPE_P type. * gcc.dg/pr51865.c: New test. From-SVN: r183207 --- gcc/tree-inline.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/tree-inline.c') diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index a039890..ae773f6 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1,6 +1,6 @@ /* Tree inlining. - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, + 2012 Free Software Foundation, Inc. Contributed by Alexandre Oliva This file is part of GCC. @@ -5201,9 +5201,9 @@ tree_function_versioning (tree old_decl, tree new_decl, /* Add local vars. */ add_local_variables (DECL_STRUCT_FUNCTION (old_decl), cfun, &id, false); - if (VOID_TYPE_P (TREE_TYPE (DECL_RESULT (old_decl)))) + if (DECL_RESULT (old_decl) == NULL_TREE) ; - else if (skip_return) + else if (skip_return && !VOID_TYPE_P (TREE_TYPE (DECL_RESULT (old_decl)))) { DECL_RESULT (new_decl) = build_decl (DECL_SOURCE_LOCATION (DECL_RESULT (old_decl)), -- cgit v1.1