LegalizeTypes can sometimes have deleted nodes
[oota-llvm.git] / test / C++Frontend / 2008-02-13-sret.cpp
index 11595ba4e942153076239033eb6f5bd3071635e7..fd427caf30429e2822838d31b68bd61ec2a97efd 100644 (file)
@@ -1,8 +1,9 @@
-// RUN: %llvmgxx -S -O0 -emit-llvm %s -o - | grep retval | grep S242 | grep {i32 1} | count 2
+// RUN: %llvmgxx -S -O0 -m32 -emit-llvm %s -o - | grep {retval\\|memtmp} | \
+// RUN: grep S242 | grep {i32 1} | count 1
+
+// Test that all 8 bytes of ret in check242 are copied, and only 4 bytes of
+// ret in check93 are copied (the same LLVM struct is used for both).
 
-// Test that all 8 bytes of ret in check242 are copied.  llvm-gcc was
-// treating S242 as if it were S93, which does not need to have the
-// last 4 padding bytes copied.
 typedef __builtin_va_list va_list;
 typedef unsigned long size_t;
 void *memset(void *, int, size_t);