summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/980505-1.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/980505-1.c b/gcc/testsuite/gcc.c-torture/execute/980505-1.c
new file mode 100644
index 00000000000..905241164dd
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/980505-1.c
@@ -0,0 +1,11 @@
+static int f(int) __attribute__((const));
+int main()
+{
+ int f1, f2, x;
+ x = 1; f1 = f(x);
+ x = 2; f2 = f(x);
+ if (f1 != 1 || f2 != 2)
+ abort ();
+ exit (0);
+}
+static int f(int x) { return x; }
OpenPOWER on IntegriCloud