aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr71581.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr71581.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr71581.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr71581.c b/gcc/testsuite/gcc.dg/pr71581.c
new file mode 100644
index 00000000000..d82eb1ed5c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr71581.c
@@ -0,0 +1,24 @@
+/* PR middle-end/71581 */
+/* { dg-do compile } */
+/* { dg-options "-Wuninitialized" } */
+
+_Complex float
+f1 (void)
+{
+ float x;
+ return x; /* { dg-warning "is used uninitialized in this function" } */
+}
+
+_Complex double
+f2 (void)
+{
+ double x;
+ return x; /* { dg-warning "is used uninitialized in this function" } */
+}
+
+_Complex int
+f3 (void)
+{
+ int x;
+ return x; /* { dg-warning "is used uninitialized in this function" } */
+}