aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/20040411-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/20040411-1.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/20040411-1.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/20040411-1.c b/SingleSource/Regression/C/gcc-c-torture/execute/20040411-1.c
new file mode 100644
index 00000000..8db45622
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/20040411-1.c
@@ -0,0 +1,23 @@
+int
+sub1 (int i, int j)
+{
+ typedef int c[i+2];
+ int x[10], y[10];
+
+ if (j == 2)
+ {
+ memcpy (x, y, 10 * sizeof (int));
+ return sizeof (c);
+ }
+ else
+ return sizeof (c) * 3;
+}
+
+int
+main ()
+{
+ if (sub1 (20, 3) != 66 * sizeof (int))
+ abort ();
+
+ return 0;
+}