if (decl_b && TREE_CODE (decl_b) == SSA_NAME)
return tristate::TS_FALSE;
+ /* Different decls don't alias. */
+ if (decl_a && decl_b && decl_a != decl_b)
+ return tristate::TS_FALSE;
+
/* Try both ways, for symmetry. */
tristate ts_ab = eval_alias_1 (base_reg_a, base_reg_b);
if (ts_ab.is_false ())
--- /dev/null
+/* Reduced from a case in haproxy's cfgparse.c where -fanalyzer
+ erroneously considered the __atomic_exchange_n (&i, 1, 0) to
+ affect "cookie_len" rather than "i". */
+
+extern int cookie_len;
+
+void
+check_config_validity ()
+{
+ static char i;
+
+ if (!cookie_len)
+ cookie_len = 64;
+
+ while (1)
+ {
+ __atomic_exchange_n (&i, 1, 0); /* { dg-warning "infinite loop" } */
+ }
+}
--- /dev/null
+/* Reduced from a case in haproxy's haproxy.c where -fanalyzer
+ erroneously considered the __atomic_feth_add (&warn_fail, 1, 0) to
+ affect "ti" rather than "warn_fail". */
+
+struct thread_info
+{
+ unsigned tid;
+};
+extern struct thread_info ha_thread_info[64];
+extern __thread const struct thread_info *ti;
+extern __thread unsigned int tid;
+
+static inline void
+ha_set_thread (const struct thread_info *thr)
+{
+ if (thr)
+ tid = thr->tid;
+ else
+ {
+ tid = 0;
+ ti = &ha_thread_info[0];
+ }
+}
+
+void
+run_thread_poll_loop (const struct thread_info *thr)
+{
+ static int warn_fail;
+
+ ha_set_thread (thr);
+
+ __atomic_fetch_add (&warn_fail, 1, 0);
+}