The PR65244 has an issue with code in init_from_control_deps
for which there's no direct testcase. The following adds one.
PR tree-optimization/65244
* gcc.dg/uninit-pr65244-1.c: New testcase.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -Wuninitialized" } */
+
+extern void __attribute__((noreturn)) abort (void);
+
+int foo (int flag, int val)
+{
+ int tem;
+ if (flag)
+ {
+ if (val == 0)
+ abort ();
+ tem = val;
+ }
+ /* large - prevent jump threading */
+ __asm__ volatile ("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
+ if (flag)
+ return tem; /* { dg-bogus "uninitialized" } */
+ return 0;
+}