aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr99824.c
blob: 9022d4a4b8e7fae58b3fa15f49c0a1468af1e0e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* { dg-do compile } */

unsigned int
strlenx(char *s)
{
  char *orig_s = s;
  for (; *s; ++s)
    ;
  return s - orig_s;
}

struct i2c_adapter {
    char name[48];
};

struct {
    int instance;
    struct i2c_adapter i2c_adap[];
} * init_cx18_i2c_cx;

const struct i2c_adapter cx18_i2c_adap_template = {""};
int init_cx18_i2c___trans_tmp_1;

void
init_cx18_i2c()
{
  int i = 0;
  for (;; i++) {
      init_cx18_i2c_cx->i2c_adap[i] = cx18_i2c_adap_template;
      init_cx18_i2c___trans_tmp_1
	= strlenx(init_cx18_i2c_cx->i2c_adap[i].name);
  }
}