aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/950426-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/950426-1.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/950426-1.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/950426-1.c b/SingleSource/Regression/C/gcc-c-torture/execute/950426-1.c
new file mode 100644
index 00000000..076032c7
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/950426-1.c
@@ -0,0 +1,32 @@
+
+struct tag {
+ int m1;
+ char *m2[5];
+} s1, *p1;
+
+int i;
+
+main()
+{
+ s1.m1 = -1;
+ p1 = &s1;
+
+ if ( func1( &p1->m1 ) == -1 )
+ foo ("ok");
+ else
+ abort ();
+
+ i = 3;
+ s1.m2[3]= "123";
+
+ if ( strlen( (p1->m2[i])++ ) == 3 )
+ foo ("ok");
+ else
+ abort ();
+
+ exit (0);
+}
+
+func1(int *p) { return(*p); }
+
+foo (char *s) {}