2 /* { dg-do compile } */
3 /* { dg-options "-Wall" } */
15 r
+= sizeof (arr
) / sizeof (*arr
);
16 r
+= sizeof (arr
) / sizeof (p
); /* { dg-warning "expression does not compute" "" { target { ! ilp32 } } } */
17 r
+= sizeof (arr
) / sizeof p
; /* { dg-warning "expression does not compute" "" { target { ! ilp32 } } } */
18 r
+= sizeof (arr
) / (sizeof p
);
19 r
+= sizeof (arr
) / (sizeof (p
));
20 r
+= sizeof (arr2
) / sizeof p
;
21 r
+= sizeof (arr2
) / sizeof (int); /* { dg-warning "expression does not compute" "" { target { ! ilp32 } } } */
22 r
+= sizeof (arr2
) / sizeof (int *);
23 r
+= sizeof (arr2
) / sizeof (short *);
24 r
+= sizeof (arr
) / sizeof (int);
25 r
+= sizeof (arr
) / sizeof (unsigned int);
26 r
+= sizeof (arr
) / sizeof (T
);
27 r
+= sizeof (arr
) / sizeof (short); /* { dg-warning "expression does not compute" } */
28 r
+= sizeof (arr
) / (sizeof (short));
30 r
+= sizeof (ap
) / sizeof (char); /* { dg-warning ".sizeof. on array function parameter" } */
32 const char arr3
[] = "foo";
33 r
+= sizeof (arr3
) / sizeof(char);
34 r
+= sizeof (arr3
) / sizeof(int);
35 r
+= sizeof (arr3
) / sizeof (*arr3
);
38 r
+= sizeof (arr4
) / sizeof (arr4
[0]);
39 r
+= sizeof (arr4
) / sizeof (*arr4
);
40 r
+= sizeof (arr4
) / sizeof (**arr4
);
41 r
+= sizeof (arr4
) / sizeof (int *);
42 r
+= sizeof (arr4
) / sizeof (int);
43 r
+= sizeof (arr4
) / sizeof (short int);
46 r
+= sizeof (arr5
) / sizeof (T
);
47 r
+= sizeof (arr5
) / sizeof (int);
48 r
+= sizeof (arr5
) / sizeof (short); /* { dg-warning "expression does not compute" } */
51 r
+= sizeof (arr6
) / sizeof (double);
52 r
+= sizeof (arr6
) / sizeof (float); /* { dg-warning "expression does not compute" } */
53 r
+= sizeof (arr6
) / sizeof (*arr6
);