aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-13.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-11-16 15:43:39 -0800
committerRichard Henderson <rth@gcc.gnu.org>2005-11-16 15:43:39 -0800
commit978dee9ad2cb226af83831bcd1becaa1652964e0 (patch)
treec288491f515c50ad8125312a40e42328d819a661 /gcc/testsuite/gcc.dg/uninit-13.c
parentdbb28e4b135080a823bd74f922ff48e79b52946a (diff)
downloadgcc-978dee9ad2cb226af83831bcd1becaa1652964e0.zip
gcc-978dee9ad2cb226af83831bcd1becaa1652964e0.tar.gz
gcc-978dee9ad2cb226af83831bcd1becaa1652964e0.tar.bz2
re PR middle-end/23497 (Bogus 'is used uninitialized...' warning about std::complex<T>)
PR middle-end/23497 * tree-ssa.c (warn_uninitialized_var): Skip real and imaginary parts of an SSA_NAME. From-SVN: r107107
Diffstat (limited to 'gcc/testsuite/gcc.dg/uninit-13.c')
-rw-r--r--gcc/testsuite/gcc.dg/uninit-13.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/uninit-13.c b/gcc/testsuite/gcc.dg/uninit-13.c
new file mode 100644
index 0000000..168939a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/uninit-13.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O -Wuninitialized" } */
+
+typedef _Complex float C;
+C foo()
+{
+ C f;
+ __imag__ f = 0;
+ return f; /* { dg-warning "" "uninit" { xfail *-*-* } } */
+}