summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/20030823-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/20030823-1.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20030823-1.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20030823-1.c b/gcc/testsuite/gcc.c-torture/compile/20030823-1.c
new file mode 100644
index 00000000000..89a3ea50a7f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20030823-1.c
@@ -0,0 +1,18 @@
+struct A
+{
+ int a;
+};
+
+int foo (struct A *a)
+{
+ static int c = 30;
+ int x;
+
+ a->a = c;
+ /* Dominator optimizations will replace the use of 'a->a' with 'c', but
+ they won't copy the virtual operands for 'c' from its originating
+ statement. This exposes symbol 'c' without a correct SSA version
+ number. */
+ x = a->a;
+ return x;
+}