gcc/ChangeLog:
2016-09-23 Kugan Vivekanandarajah <kuganv@linaro.org>
PR ipa/77677
* ipa-cp.c (propagate_vr_accross_jump_function): Drop TREE_OVERFLOW
from constant while creating value range.
gcc/testsuite/ChangeLog:
2016-09-23 Kugan Vivekanandarajah <kuganv@linaro.org>
PR ipa/77677
* gcc.dg/torture/pr77677.c: New test.
From-SVN: r240420
+2016-09-23 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ PR ipa/77677
+ * ipa-cp.c (propagate_vr_accross_jump_function): Drop TREE_OVERFLOW
+ from constant while creating value range.
+
2016-09-23 Renlin Li <renlin.li@arm.com>
* ira.c (ira): Move ira_use_lra_p initialization code to ...
tree val = ipa_get_jf_constant (jfunc);
if (TREE_CODE (val) == INTEGER_CST)
{
+ if (TREE_OVERFLOW_P (val))
+ val = drop_tree_overflow (val);
jfunc->vr_known = true;
jfunc->m_vr.type = VR_RANGE;
jfunc->m_vr.min = val;
+2016-09-23 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ PR ipa/77677
+ * gcc.dg/torture/pr77677.c: New test.
+
2016-09-23 Andre Vehreschild <vehre@gcc.gnu.org>
* gfortran.dg/coarray_lib_comm_1.f90: Using the old caf-interface
--- /dev/null
+/* PR ipa/77677 */
+/* { dg-do compile } */
+
+int a, b;
+
+static void fn1 (short p1)
+{
+ a = -p1;
+ if (a || b)
+ __builtin_printf ("%d\n", b);
+}
+
+int main ()
+{
+ int c[] = { 40000 };
+ fn1 (c[0]);
+ return 0;
+}