Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/tree-ssa/pr57380.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
131 | 2 /* { dg-options "-O2 -fdump-tree-phiopt2" } */ |
111 | 3 /* { dg-add-options bind_pic_locally } */ |
4 | |
5 struct my_array { | |
6 int data[4]; | |
7 }; | |
8 | |
9 const int& my_max(const int& a, const int& b) { | |
10 return a < b ? b : a; | |
11 } | |
12 | |
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; | |
19 } | |
20 | |
131 | 21 /* { dg-final { scan-tree-dump "MAX_EXPR" "phiopt2" } } */ |