aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-12-O0.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/uninit-12-O0.c')
-rw-r--r--gcc/testsuite/gcc.dg/uninit-12-O0.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/uninit-12-O0.c b/gcc/testsuite/gcc.dg/uninit-12-O0.c
new file mode 100644
index 00000000000..7c0664e4dfc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/uninit-12-O0.c
@@ -0,0 +1,12 @@
+/* PR 23497 */
+/* { dg-do compile } */
+/* { dg-options "-Wuninitialized" } */
+
+typedef _Complex float C;
+C foo()
+{
+ C f;
+ __real__ f = 0;
+ __imag__ f = 0;
+ return f;
+}