From: Jakub Jelinek Date: Fri, 11 Mar 2011 10:04:30 +0000 (+0100) Subject: re PR tree-optimization/48063 (ICE: verify_stmts failed: conversion of register to... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e89e03ab8ad601244c1206d8fe3b5874b8d59c91;p=gcc.git re PR tree-optimization/48063 (ICE: verify_stmts failed: conversion of register to a different size with -fno-early-inlining) PR tree-optimization/48063 * ipa-inline.c (cgraph_decide_inlining): Don't try to inline functions called once if !tree_can_inline_p (node->callers). * gcc.dg/torture/pr48063.c: New test. From-SVN: r170867 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 498e45c40a3..9630d36614d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-11 Jakub Jelinek + + PR tree-optimization/48063 + * ipa-inline.c (cgraph_decide_inlining): Don't try to + inline functions called once if !tree_can_inline_p (node->callers). + 2011-03-11 Chen Liqin * config.gcc (score-*-elf): Add extra_parts .., update tmake_file and diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index e8676c8394b..7ae5f96dc7c 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1,5 +1,5 @@ /* Inlining decision heuristics. - Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010 + Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Jan Hubicka @@ -1498,6 +1498,7 @@ cgraph_decide_inlining (void) && node->callers->caller != node && node->callers->caller->global.inlined_to != node && !node->callers->call_stmt_cannot_inline_p + && tree_can_inline_p (node->callers) && !DECL_EXTERNAL (node->decl)) { cgraph_inline_failed_t reason; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c3dec73ba13..23c94cec8fc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-03-11 Jakub Jelinek + + PR tree-optimization/48063 + * gcc.dg/torture/pr48063.c: New test. + 2011-03-10 Jason Merrill * g++.dg/template/array22.C: New. diff --git a/gcc/testsuite/gcc.dg/torture/pr48063.c b/gcc/testsuite/gcc.dg/torture/pr48063.c new file mode 100644 index 00000000000..d861bf04c80 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr48063.c @@ -0,0 +1,19 @@ +/* PR tree-optimization/48063 */ +/* { dg-do compile } */ +/* { dg-options "-fno-early-inlining" } */ + +extern void abort (void); +static void bar (); + +void +foo () +{ + bar (1); +} + +static void +bar (double i) +{ + if (i) + abort (); +}