summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-pr40943.c
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-09 15:51:16 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-09 15:51:16 +0000
commit11d0d7f155efc46f0e345cb4d918347811bbc43f (patch)
tree4d8251ebe3d88dcc52aaebb1ef776409b3fddd15 /gcc/testsuite/gcc.dg/uninit-pr40943.c
parente0e9d5aa5ff5285c517aec4e284ca5b2034e2ad0 (diff)
downloadgcc-11d0d7f155efc46f0e345cb4d918347811bbc43f.tar.gz
* Merge from mainline rev 150253:151506.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/transactional-memory@151563 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/uninit-pr40943.c')
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr40943.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/uninit-pr40943.c b/gcc/testsuite/gcc.dg/uninit-pr40943.c
new file mode 100644
index 00000000000..2b6e9131cb1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/uninit-pr40943.c
@@ -0,0 +1,10 @@
+/* PR middle-end/40943 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wuninitialized" } */
+
+void
+foo (void)
+{
+ int *p;
+ *p = 3; /* { dg-warning "is used uninitialized" } */
+}