Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/torture/pr45709.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 } |
2 | |
3 struct Region { | |
4 int storage[4]; | |
5 int count; | |
6 }; | |
7 static inline Region subtract(int lhs) | |
8 { | |
9 Region reg; | |
10 int* storage = reg.storage; | |
11 if (lhs > 0) | |
12 storage++; | |
13 reg.count = storage - reg.storage; | |
14 return reg; | |
15 } | |
16 void bar(int a) | |
17 { | |
18 const Region copyBack(subtract(a)); | |
19 } |