repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.ext
/
constructor.C
blob
3dc15c52acd710107f1b09176d33184346f69c36
1
// { dg-do run }
2
// { dg-options "" }
3
// Testcase for constructor expressions (GNU extension)
4
5
struct Any {
6
int *type;
7
int *addr;
8
};
9
10
int i, j;
11
12
int
13
main () {
14
struct Any *ap = (struct Any *)
15
__builtin_alloca (sizeof(struct Any));
16
*ap = ((struct Any){ &i, &j }) ;
17
18
if (ap->type != &i || ap->addr != &j)
19
return 1;
20
return 0;
21
}