Debian Codegraph @

gcc/testsuite/g++.dg/tree-ssa/cond-temp1.C

raw
1 // Test that the ?: only creates one temporary.
2 // { dg-additional-options "-fdump-tree-gimple" }
3 // { dg-final { scan-tree-dump-times "struct A" 2 "gimple" } }
4
5 struct A
6 {
7 int i;
8 A(int);
9 };
10
11 bool b;
12 int main()
13 {
14 A a = 1;
15 a = b ? A(2) : A(3);
16 }