Initialize split_branch_probability (PR target/82863).
authorMartin Liska <mliska@suse.cz>
Thu, 9 Nov 2017 12:19:02 +0000 (13:19 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 9 Nov 2017 12:19:02 +0000 (12:19 +0000)
2017-11-09  Martin Liska  <mliska@suse.cz>

PR target/82863
* emit-rtl.c (init_emit_regs): Initialize split_branch_probability to
uninitialized.
2017-11-09  Martin Liska  <mliska@suse.cz>

PR target/82863
* gcc.dg/pr82863.c: New test.

From-SVN: r254574

gcc/ChangeLog
gcc/emit-rtl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr82863.c [new file with mode: 0644]

index 3cb3b9eafcdf31827cc68aea1ef574410a2bb374..e98d7bba856b54eb53d239b7ecb1e4c9ee7a3789 100644 (file)
@@ -1,3 +1,9 @@
+2017-11-09  Martin Liska  <mliska@suse.cz>
+
+       PR target/82863
+       * emit-rtl.c (init_emit_regs): Initialize split_branch_probability to
+       uninitialized.
+
 2017-11-09  Martin Liska  <mliska@suse.cz>
 
        PR tree-optimization/82669
index cfe0fcec8e2b22af4e2eb90db16b7f415b75c860..da4f53315a6cb2f51cb1b22c78dbf33f7c84aabd 100644 (file)
@@ -5952,6 +5952,8 @@ init_emit_regs (void)
        }
       mode_mem_attrs[i] = attrs;
     }
+
+  split_branch_probability = profile_probability::uninitialized ();
 }
 
 /* Initialize global machine_mode variables.  */
index 78116ef442f210f7401dd730a18b0e56a9226255..b2852caa449ee135ad09263a6872c6da49909502 100644 (file)
@@ -1,3 +1,8 @@
+2017-11-09  Martin Liska  <mliska@suse.cz>
+
+       PR target/82863
+       * gcc.dg/pr82863.c: New test.
+
 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * 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 (file)
index 0000000..b402816
--- /dev/null
@@ -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;
+}