Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pr94436.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 2b5abeee2509 |
children |
rev | line source |
---|---|
152 | 1 /* PR middle-end/94436 */ |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-Wincompatible-pointer-types" } */ | |
4 | |
5 struct S { int s; }; | |
6 int foo (struct S *); | |
7 | |
8 int | |
9 bar (void) | |
10 { | |
11 int s = 0; | |
12 return foo ((struct S *) ((char *) &s - (char *) &((struct S *) 0)->s)); /* { dg-bogus "from incompatible pointer type" } */ | |
13 } |