2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr80262.c
blobf34d06e8c8ad8f6d160f4940cab40d7ed626e067
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 typedef struct {
5 int v;
6 } S1;
7 S1 clearS1 () { S1 s1 = { 0 }; return s1; }
9 typedef struct {
10 S1 s1[4];
11 } S2;
12 void clearS2 (__seg_gs S2* p, int n) {
13 for (int i = 0; i < n; ++i)
14 p->s1[i] = clearS1 ();
17 typedef struct {
18 int pad;
19 S2 s2;
20 } S3;
22 long int BASE;
24 void fn1(int n) {
25 clearS2 (&(((__seg_gs S3*)(BASE))->s2), n);