* gcc.c-torture/execute/20040823-1.c: New test.
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
Mon, 23 Aug 2004 08:03:39 +0000 (10:03 +0200)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Mon, 23 Aug 2004 08:03:39 +0000 (08:03 +0000)
From-SVN: r86415

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

index d3627a076afea8bfd783bad74ac8f3757a185606..617aee6273d2dbe9df430ec3dc56d62c0e514c45 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-23  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
+
+       * gcc.c-torture/execute/20040823-1.c: New test.
+
 2004-08-23  Richard Sandiford  <rsandifo@redhat.com>
 
        * gcc.dg/special/mips-abi.exp: Expect gcc to pass the GNU ABI flags
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040823-1.c b/gcc/testsuite/gcc.c-torture/execute/20040823-1.c
new file mode 100644 (file)
index 0000000..83bf402
--- /dev/null
@@ -0,0 +1,29 @@
+/* Ensure that we create VUSE operands also for noreturn functions.  */
+
+#include <stdlib.h>
+#include <string.h>
+
+int *pwarn;
+
+void bla (void) __attribute__ ((noreturn));
+
+void bla (void)
+{
+  if (!*pwarn)
+    abort ();
+    
+  exit (0);
+}
+
+int main (void)
+{
+  int warn;
+
+  memset (&warn, 0, sizeof (warn));
+
+  pwarn = &warn;
+
+  warn = 1;
+
+  bla ();
+}