gcc/ChangeLog:
* ipa-cp.c (ipa_value_range_from_jfunc): Remove forgotten early return.
gcc/testsuite/ChangeLog:
* gcc.dg/ipa/inline10.c: New test.
ipa_jump_func *jfunc, tree parm_type)
{
value_range vr;
- return vr;
if (jfunc->m_vr)
ipa_vr_operation_and_type_effects (&vr,
jfunc->m_vr,
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Os -c -fdump-ipa-inline-details -fno-early-inlining -fno-partial-inlining" } */
+void link_error ();
+int
+test(int a)
+{
+ if (a>10)
+ {
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ }
+}
+int test2()
+{
+ for (int i=0;i<10;i++)
+ test(i);
+}
+/* { dg-final { scan-ipa-dump "Known to be false: not inlined, op0 > 10" "inline" } } */
+/* { dg-final { scan-ipa-dump "Inlined test" "inline" } } */