From 017901f43c3ef9540b7afd1af4edeb560743e3c7 Mon Sep 17 00:00:00 2001 From: Zdenek Dvorak Date: Mon, 23 Aug 2004 10:03:39 +0200 Subject: [PATCH] * gcc.c-torture/execute/20040823-1.c: New test. From-SVN: r86415 --- gcc/testsuite/ChangeLog | 4 +++ .../gcc.c-torture/execute/20040823-1.c | 29 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20040823-1.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d3627a076af..617aee6273d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-08-23 Zdenek Dvorak + + * gcc.c-torture/execute/20040823-1.c: New test. + 2004-08-23 Richard Sandiford * 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 index 00000000000..83bf4027a94 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20040823-1.c @@ -0,0 +1,29 @@ +/* Ensure that we create VUSE operands also for noreturn functions. */ + +#include +#include + +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 (); +} -- 2.30.2