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

Fredrik Hederstierna <fredrik.hederstie...@securitas-direct.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fredrik.hederstierna@securi
                   |                            |tas-direct.com

--- Comment #2 from Fredrik Hederstierna 
<fredrik.hederstie...@securitas-direct.com> ---
I have had the same problem with arm-none-eabi-gcc (GCC) 10.1.0, using
-fanalyzer.

Compiling my_test.c ..
during IPA pass: analyzer
falcon_fota.c: In function 'my_verify.part.0':
falcon_fota.c:629:5: internal compiler error: in get_or_create_mem_ref, at
analyzer/region-model.cc:6938
  629 |     app_info_t *app_info = RAM_APP_INFO_POS;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.


The pointer RAM_APP_INFO_POS is a quite special reference with address of
external variable, and adding constants to that value:

// example
extern void *_app_data_offs;
#define RAM_ADDRESS      ((uint32_t)(0xC0000000))
#define APP_INFO_POS     ((uint32_t)&_app_data_offs)
#define RAM_APP_INFO_POS (RAM_ADDRESS + APP_INFO_POS)


arm-eabi-gcc -v

Using built-in specs.
COLLECT_GCC=/opt/gcc/arm-none-eabi-toolchain-gcc-10.1.0-binutils-2.33.1-newlib-3.3.0-hardfloat/bin/arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/opt/gcc/arm-none-eabi-toolchain-gcc-10.1.0-binutils-2.33.1-newlib-3.3.0-hardfloat/libexec/gcc/arm-none-eabi/10.1.0/lto-wrapper
Target: arm-none-eabi
Configured with: ../../gcc-10.1.0/configure --enable-languages=c,c++
--target=arm-none-eabi
--prefix=/opt/gcc/arm-none-eabi-toolchain-gcc-10.1.0-binutils-2.33.1-newlib-3.3.0-hardfloat
--with-gnu-as --with-gnu-ld --with-newlib --with-system-zlib
--with-endian=little --disable-interwork --with-mode=thumb --with-abi=aapcs
--with-cpu=cortex-m4 --with-float=hard --with-fpu=fpv4-sp-d16 --disable-nls
--disable-libssp --enable-multilib
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.1.0 (GCC)

Reply via email to