aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-23.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/uninit-23.c')
-rw-r--r--gcc/testsuite/gcc.dg/uninit-23.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/uninit-23.c b/gcc/testsuite/gcc.dg/uninit-23.c
new file mode 100644
index 0000000..b38e1d0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/uninit-23.c
@@ -0,0 +1,27 @@
+/* PR tree-optimization/78455 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wuninitialized" } */
+
+int ij;
+
+void
+ql (void)
+{
+ int m5 = 0;
+
+ for (;;)
+ {
+ if (0)
+ for (;;)
+ {
+ int *go;
+ int *t4 = go;
+
+ l1:
+ *t4 = (*t4 != 0) ? 0 : 2; /* { dg-warning "may be used uninitialized" } */
+ }
+
+ if (ij != 0)
+ goto l1;
+ }
+}