From: Martin Liska Date: Thu, 9 Nov 2017 12:19:02 +0000 (+0100) Subject: Initialize split_branch_probability (PR target/82863). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af36439968794e53382c6733c9f42adcf1c03dad;p=gcc.git Initialize split_branch_probability (PR target/82863). 2017-11-09 Martin Liska PR target/82863 * emit-rtl.c (init_emit_regs): Initialize split_branch_probability to uninitialized. 2017-11-09 Martin Liska PR target/82863 * gcc.dg/pr82863.c: New test. From-SVN: r254574 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3cb3b9eafcd..e98d7bba856 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-11-09 Martin Liska + + PR target/82863 + * emit-rtl.c (init_emit_regs): Initialize split_branch_probability to + uninitialized. + 2017-11-09 Martin Liska PR tree-optimization/82669 diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index cfe0fcec8e2..da4f53315a6 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -5952,6 +5952,8 @@ init_emit_regs (void) } mode_mem_attrs[i] = attrs; } + + split_branch_probability = profile_probability::uninitialized (); } /* Initialize global machine_mode variables. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 78116ef442f..b2852caa449 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-11-09 Martin Liska + + PR target/82863 + * gcc.dg/pr82863.c: New test. + 2017-11-09 Hristian Kirtchev * gnat.dg/unreferenced.adb: New testcase. diff --git a/gcc/testsuite/gcc.dg/pr82863.c b/gcc/testsuite/gcc.dg/pr82863.c new file mode 100644 index 00000000000..b4028169a96 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr82863.c @@ -0,0 +1,12 @@ +/* PR c/82167 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +typedef long long a; +a b; +float +c () +{ + float d = b > 0; + return d; +}