2018-01-06 Jakub Jelinek <jakub@redhat.com>
+ PR debug/83480
+ * toplev.c (process_options): Don't enable debug_nonbind_markers_p
+ by default if flag_selective_schedling{,2}. Formatting fixes.
+
PR rtl-optimization/83682
* rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
if it has non-VECTOR_MODE element mode.
2018-01-06 Jakub Jelinek <jakub@redhat.com>
+ PR debug/83480
+ * gcc.dg/pr83480.c: New test.
+
PR rtl-optimization/83682
* gcc.target/i386/pr83682.c: New test.
--- /dev/null
+/* PR debug/83480 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g -fselective-scheduling2 -ftree-vectorize -freorder-blocks-algorithm=simple -fnon-call-exceptions -fno-guess-branch-probability -fno-peephole2 -fno-tree-sink -fno-tree-scev-cprop" } */
+
+signed char a, b;
+
+void
+foo (int x, int y)
+{
+ for (a = 1; a != 0; ++a)
+ ;
+
+ for (;;)
+ {
+ int c;
+
+ b %= (y != 0 && a != 0) + 1;
+ if (a != 0)
+ y = b;
+
+ for (c = 0; c < 50; ++c)
+ ++x;
+
+ if (a < 1)
+ {
+ while (x != 0)
+ ;
+
+ a /= 0; /* { dg-warning "division by zero" } */
+ }
+ }
+}
flag_var_tracking_uninit = flag_var_tracking;
if (flag_var_tracking_assignments == AUTODETECT_VALUE)
- flag_var_tracking_assignments = flag_var_tracking
- && !(flag_selective_scheduling || flag_selective_scheduling2);
+ flag_var_tracking_assignments
+ = (flag_var_tracking
+ && !(flag_selective_scheduling || flag_selective_scheduling2));
if (flag_var_tracking_assignments_toggle)
flag_var_tracking_assignments = !flag_var_tracking_assignments;
"var-tracking-assignments changes selective scheduling");
if (debug_nonbind_markers_p == AUTODETECT_VALUE)
- debug_nonbind_markers_p = optimize && debug_info_level >= DINFO_LEVEL_NORMAL
- && (write_symbols == DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG);
+ debug_nonbind_markers_p
+ = (optimize
+ && debug_info_level >= DINFO_LEVEL_NORMAL
+ && (write_symbols == DWARF2_DEBUG
+ || write_symbols == VMS_AND_DWARF2_DEBUG)
+ && !(flag_selective_scheduling || flag_selective_scheduling2));
if (flag_tree_cselim == AUTODETECT_VALUE)
{