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
PR c++/85277 - ICE with invalid offsetof.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ext
/
builtin-offsetof1.C
blob
cbc2daafbdd8bfc5b187ba7296ce763d8c8da596
1
// PR c++/51413
2
// PR c++/85277
3
// { dg-options "-Wno-pointer-arith" }
4
5
struct A
6
{
7
static void foo();
8
};
9
10
int i = __builtin_offsetof(A, foo[1]); // { dg-error "offsetof" }
11
int j = __builtin_offsetof(volatile A, foo[0]); // { dg-error "offsetof" }