Error declaring 2 volatile bytes

I’m trying to declare 2 volatile bytes to run as part of ISR for 2 separate hall effect sensors to measure and calculate RPM as follows:

volatile byte half_revolutions;
unsigned int rpm;
unsigned long timeold;

volatile byte half_revolutions2;
unsigned int rpm2;
unsigned long timeold2;

As soon as I compile this and the rest of the program, I get the following error text in IDE 1.8.9:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp: In member function ‘availableForWrite’:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp:203:1: internal compiler error: Segmentation fault

}

^

Please submit a full bug report,

with preprocessed source if appropriate.

See http://gcc.gnu.org/bugs.html for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/…/lib/gcc/avr/5.4.0/…/…/…/…/avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for “Adafruit_MMA8451.h”
Used: C:\Users\AS9763\Documents\Arduino\libraries\Adafruit_MMA8451
Not used: C:\Users\AS9763\Documents\Arduino\libraries\Adafruit_MMA8451_Library-master
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

If I remove the “volatile byte half_revolutions2;” line, the error goes away.

Any suggestions would be appreciated as I’m still quite new to this!

thanks

panda_pilot: As soon as I compile this and the rest of the program, I get the following error text in IDE 1.8.9:

We can't see the rest of the program - which is probably where the problem lies.

...R

It's a known bug in the toolchain that came with certain versions of the IDE.

It seems to be solved in the toolchain that comes with IDE 1.8.10. So you can upgrade the IDE.

Alternatively upgrade the board manager to the latest (i think the version should be 1.6.24 or higher) or downgrade the board manager to 1.6.21. Note that I'm talking about board manager, not IDE.

upgrading to 1.8.10 solved it - thanks!