https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95152

--- Comment #4 from Fredrik Hederstierna 
<fredrik.hederstie...@securitas-direct.com> ---
Stripped down example:

File <test.i>:


typedef struct {
  int var;
} info_t;
extern void *_data_offs;
void test()
{
  info_t *info = ((void *)((void *)1) + ((unsigned int)&_data_offs));
  my_func(info->var == 0);
}

Output:

during IPA pass: analyzer
test2.i:10:42: internal compiler error: in get_or_create_mem_ref, at
analyzer/region-model.cc:6938
   10 |   info_t *info = ((void *)((void *)1) + ((unsigned int)&_data_offs));
      |                                         ~^~~~~~~~~~~~~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.


Compilation:

/opt/gcc/arm-none-eabi-toolchain-gcc-10.1.0-binutils-2.33.1-newlib-3.3.0-hardfloat/bin/arm-none-eabi-gcc
-fanalyzer -O2 -o test.o test.i

BR Fredrik

Reply via email to