Compile Error using example code

1st I'm a beginner so this is likely to be something basic/stupid (sorry in advance)

Previously I uploaded my first code for a load cell(weight sensor) and that works fine.

I now want to add a SD card so I just want to check the connections I made - I tried the 'card info' script from the library but I get a compilation error (below)

I checked comms - all were OK and opening the serial monitor the board is still running the weight sensor script - do I need to delete that first or stop it running? I've tried the reset on the board but that only stopped it running for a few seconds it doesn't seem to erase the script.

error is:

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"

In function 'global constructors keyed to 65535_0_CardInfo.ino.cpp.o':

lto1.exe: 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

exit status 1
Error compiling for board Arduino/Genuino Uno.

Please submit a full bug report,

with preprocessed source if appropriate.

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

Just a thought, do I need to install a SPI Library first - if so which one a search in library returns loads of results..

TMFKAA

So you think it's a bug - I would have expected 99.9% chance I was doing something wrong...

I've tried to re-upload the weighing scale code (that worked previously and us still running on the board and I also get a compilation error now....

It's a known bug in the latest toolchain. Solution is to downgrade the board manager to version 1.6.21.

Steps:
Tools -> Board -> Boards Manager
Click Arduino AVR boards area
Select version from the version dropdown
Click update

Thanks for the replies, I restarted my pc and it worked again..

I'll downgrade the board manager to stop it happening again. (Thanks)