Skip to content

AVR internal error 2017091103 with array and -Ooregvar

An internal error is generated when using an array with at least two elements and the -Ooregvar optimization (or -O2 or higher). Test code:

program testopt;

var ar: array[0..1] of byte;

begin ar[0] := 1; ar[1] := 2; end.

Compile test with: /fpc/gitlab-cc/compiler/avr/pp -n @/fpc/gitlab-cc/fpc.cfg -Ooregvar -Wpatmega328p testopt.pp Free Pascal Compiler version 3.3.1 [2021/08/28] for avr Copyright (c) 1993-2021 by Florian Klaempfl and others Target OS: Embedded Compiling testopt.pp testopt.pp(8,5) Fatal: Internal error 2017091103 Fatal: Compilation aborted

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information