From: Zdenek Dvorak Date: Mon, 23 Aug 2004 08:03:39 +0000 (+0200) Subject: * gcc.c-torture/execute/20040823-1.c: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=017901f43c3ef9540b7afd1af4edeb560743e3c7;p=gcc.git * gcc.c-torture/execute/20040823-1.c: New test. From-SVN: r86415 --- 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 (); +}