Fix all tests that fail with -sanitize=return.
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr57380.C
blobfce6279eeb5240a28b70ca7ab6bb6162ba05c699
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-phiopt1" } */
3 /* { dg-add-options bind_pic_locally } */
5 struct my_array {
6     int data[4];
7 };
9 const int& my_max(const int& a, const int& b) {
10     return a < b ? b : a;
13 int f(my_array a, my_array b) {
14     int res = 0;
15     for (int i = 0; i < 4; ++i) {
16         res += my_max(a.data[i], b.data[i]);
17     }
18     return res;
21 /* { dg-final { scan-tree-dump "MAX_EXPR" "phiopt1" } } */