OSDN Git Service

2003-11-09 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Nov 2003 21:27:16 +0000 (21:27 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Nov 2003 21:27:16 +0000 (21:27 +0000)
* gcc.c-torture/compile/200031109-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73397 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/200031109-1.c [new file with mode: 0644]

index 587bfdd..9359954 100644 (file)
@@ -1,3 +1,7 @@
+2003-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * gcc.c-torture/compile/200031109-1.c: New test.
+
 2003-11-08  Joseph S. Myers  <jsm@polyomino.org.uk>
 
        PR c/3190
diff --git a/gcc/testsuite/gcc.c-torture/compile/200031109-1.c b/gcc/testsuite/gcc.c-torture/compile/200031109-1.c
new file mode 100644 (file)
index 0000000..d1d495b
--- /dev/null
@@ -0,0 +1,11 @@
+/* For a short time on the tree-ssa branch this would warn that
+   value was not initialized as it was optimizing !(value = (m?1:2))
+   to 0 and not setting value before.  */
+
+int t(int m)
+{
+  int value;
+  if (!(value = (m?1:2)))
+    value = 0;
+  return value;
+}