1 /* { dg-do compile } */ 2 /* { dg-options "-O2" } */ 3 4 typedef struct { 5 int v; 6 } S1; clearS1()7S1 clearS1 () { S1 s1 = { 0 }; return s1; } 8 9 typedef struct { 10 S1 s1[4]; 11 } S2; clearS2(__seg_gs S2 * p,int n)12void clearS2 (__seg_gs S2* p, int n) { 13 for (int i = 0; i < n; ++i) 14 p->s1[i] = clearS1 (); 15 } 16 17 typedef struct { 18 int pad; 19 S2 s2; 20 } S3; 21 22 long int BASE; 23 fn1(int n)24void fn1(int n) { 25 clearS2 (&(((__seg_gs S3*)(BASE))->s2), n); 26 } 27