tree-optimization/120924 - up --param uninit-max-chain-len

The PR shows that the uninit analysis limits are set too low in
cases we lower switches to ifs as happens on s390x for a linux
kernel TU.  This causes false positive uninit diagnostics as we
abort the attempt to prove that a value is initialized on all
paths.  The new testcase only would require upping to 9.

	PR tree-optimization/120924
	* params.opt (uninit-max-chain-len): Up from 8 to 12.

	* gcc.dg/uninit-pr120924.c: New testcase.

(cherry picked from commit cf9a479e3f909d5217e954788eb3c5b569e4bc52)
diff --git a/gcc/params.opt b/gcc/params.opt
index 412b670..64e453d 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -1181,7 +1181,7 @@
 Maximum number of nested calls to search for control dependencies during uninitialized variable analysis.
 
 -param=uninit-max-chain-len=
-Common Joined UInteger Var(param_uninit_max_chain_len) Init(8) IntegerRange(1, 128) Param Optimization
+Common Joined UInteger Var(param_uninit_max_chain_len) Init(12) IntegerRange(1, 128) Param Optimization
 Maximum number of predicates anded for each predicate ored in the normalized
 predicate chain.
 
diff --git a/gcc/testsuite/gcc.dg/uninit-pr120924.c b/gcc/testsuite/gcc.dg/uninit-pr120924.c
new file mode 100644
index 0000000..bfc8ae9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/uninit-pr120924.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wmaybe-uninitialized" } */
+
+int foo(int);
+enum {
+  BPF_TRACE_RAW_TP,
+  BPF_MODIFY_RETURN,
+  BPF_LSM_MAC,
+  BPF_TRACE_ITER,
+  BPF_LSM_CGROUP
+};
+int btf_get_kernel_prefix_kind_prefix, obj_1, attach_name___trans_tmp_1;
+char attach_name_fn_name;
+void attach_name(int attach_type)
+{
+  int mod_len;
+  char mod_name = attach_name_fn_name;
+  if (attach_name_fn_name)
+    mod_len = mod_name;
+  for (; obj_1;) {
+    if (mod_name && foo(mod_len))
+      continue;
+    switch (attach_type) {
+    case BPF_TRACE_RAW_TP:
+    case BPF_LSM_MAC:
+    case BPF_LSM_CGROUP:
+      btf_get_kernel_prefix_kind_prefix = 1;
+    case BPF_TRACE_ITER:
+      attach_name_fn_name = 2;
+    }
+    if (attach_name___trans_tmp_1)
+      return;
+  }
+}