Commit 90dda0e9 by Jakub Jelinek Committed by Jakub Jelinek

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
parent 12e3ff92
2012-01-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51865
* tree-inline.c (tree_function_versioning): Call remap_decl
on DECL_RESULT whenever it has VOID_TYPE_P type.
2012-01-15 Richard Sandiford <rdsandiford@googlemail.com>
* config/mips/mips.c (mips16_build_call_stub): Don't use a stub
......
2012-01-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51865
* gcc.dg/pr51865.c: New test.
2012-01-15 Richard Sandiford <rdsandiford@googlemail.com>
* gcc.dg/tree-ssa/ssa-dom-thread-4.c: Expect 4 threaded edges for MIPS.
......
/* PR tree-optimization/51865 */
/* { dg-do compile } */
/* { dg-options "-O2 -fipa-pta" } */
void fn (const char *, const char *) __attribute__ ((__noreturn__));
int var;
inline void
foo (void)
{
if (__builtin_expect (var != 0, 0))
fn ("a", "b");
};
void
bar (void)
{
foo ();
};
void
baz (void)
{
foo ();
};
/* 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 <aoliva@redhat.com>
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)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment