Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.old-deja/g++.robertl/eb106.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 assemble { target native } } |
2 // { dg-options "-O2 -fPIC " } | |
3 struct T | |
4 { | |
5 const char* f1; | |
6 int f2; | |
7 }; | |
8 | |
9 void f(T*); | |
10 int g(); | |
11 | |
12 extern char a1[]; | |
13 | |
14 inline int m(int a, int b) {return b < a ? 2 : 1;} | |
15 | |
16 void | |
17 h() | |
18 { | |
19 T a[10]; | |
20 int i(0); | |
21 | |
22 bool c; | |
23 if (c) | |
24 { | |
25 a[i++].f1 = "asf"; | |
26 f(a); | |
27 i = 0; | |
28 } | |
29 | |
30 a[i].f1 = &a1[1]; | |
31 a[i].f2 = m(1, g()); | |
32 i++; | |
33 | |
34 a[i].f1 = "zxv"; | |
35 a[i].f2 = 0; | |
36 } |