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
2013-09-12 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
parse
/
array-size2.C
blob
355ed6133b4586103456c94cc826ca4cb485b2fe
1
// PR c/25682
2
// { dg-do compile }
3
// Test whether we don't ICE on questionable constructs where offsetof
4
// should have been used instead.
5
6
struct S
7
{
8
char a[4];
9
int b;
10
};
11
12
extern void bar (char *, char *);
13
14
void
15
foo (void)
16
{
17
char g[(char *) &((struct S *) 0)->b - (char *) 0];
18
char h[(__SIZE_TYPE__) &((struct S *) 8)->b];
19
bar (g, h);
20
}