gcc/testsuite/gcc.dg/analyzer/pr95152-4.c
raw| 1 | /* { dg-additional-options "-Wno-pointer-to-int-cast" } */ |
| 2 | /* { C only: Wno-pointer-to-int-cast is not valid for C++. */ |
| 3 | |
| 4 | extern void my_func (int); |
| 5 | typedef struct { |
| 6 | int var; |
| 7 | } info_t; |
| 8 | extern void *_data_offs; |
| 9 | void test() |
| 10 | { |
| 11 | info_t *info = (info_t *) ((void *)((void *)1) + ((unsigned int)&_data_offs)); |
| 12 | my_func(info->var == 0); |
| 13 | } |