From 4833c8bf1990cd06d5f701c23321c01c6f960038 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 30 Jan 1999 08:23:52 -0800 Subject: [PATCH] * gcc.c-torture/execute/990130-1.c: New test. From-SVN: r24925 --- gcc/testsuite/ChangeLog | 4 ++++ .../gcc.c-torture/execute/990130-1.c | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/990130-1.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 15cb42eaa52..05550ac3ff3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +Sat Jan 30 16:22:47 1999 Richard Henderson + + * gcc.c-torture/execute/990130-1.c: New test. + Sat Jan 30 11:10:06 1999 Jeffrey A Law (law@cygnus.com) * gcc.dg/990130-1.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/execute/990130-1.c b/gcc/testsuite/gcc.c-torture/execute/990130-1.c new file mode 100644 index 00000000000..c38ecddbe59 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/990130-1.c @@ -0,0 +1,23 @@ +int count = 0; +int dummy; + +static int * +bar(void) +{ + ++count; + return &dummy; +} + +static void +foo(void) +{ + asm("" : "+r"(*bar())); +} + +main() +{ + foo(); + if (count != 1) + abort(); + exit(0); +}