Unable to find a register to spill in class 'NO_REGS'

Hello, time ago I had this same issue as shown in this post, I worked around it by installing Arduino AVR Boards 1.6.9 using Boards Manager.

Now I am using install Arduino AVR Boards 1.6.14 and I have the same problem, while compiling I get this error

Linking everything together...
"C:\Users\j.i\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-gcc" -Wall -Wextra -Os -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega32u4  -o "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp/l.ino.elf" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\sketch\l.ino.cpp.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\libraries\ArtGuardLibs\Adafruit_BME280.cpp.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\libraries\ArtGuardLibs\Adafruit_TSL2561_U.cpp.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\libraries\ArtGuardLibs\Adafruit_TSL2591.cpp.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\libraries\ArtGuardLibs\TheThingsUno.cpp.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\libraries\Wire\Wire.cpp.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\libraries\Wire\utility\twi.c.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\libraries\LoRaWAN_library_arduino_v1_2\arduinoLoRaWAN.cpp.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\libraries\LoRaWAN_library_arduino_v1_2\arduinoMultiprotocol.cpp.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\libraries\LoRaWAN_library_arduino_v1_2\arduinoUART.cpp.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\libraries\LoRaWAN_library_arduino_v1_2\arduinoUtils.cpp.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp\libraries\SPI\SPI.cpp.o" "C:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp/core\core.a" "-LC:\Users\j~1.ITO\AppData\Local\Temp\build3171e882e622cdaed743144b92464b8e.tmp" -lm
\\i-s\RedirectedFolders\j\My Documents\Arduino\l\l.ino: In function 'IoT_init':

l:661: error: unable to find a register to spill in class 'NO_REGS'

 }

 ^

l:661: error: this is the insn:

(insn 863 860 866 62 (set (mem:QI (post_dec:HI (reg/f:HI 32 __SP_L__)) [0  S1 A8])

        (subreg:QI (reg/f:HI 972) 1)) \\i-s\RedirectedFolders\j\My Documents\Arduino\libraries\LoRaWAN_library_arduino_v1_2\arduinoLoRaWAN.cpp:2330 1 {pushqi1}

     (expr_list:REG_ARGS_SIZE (const_int 9 [0x9])

        (nil)))

\\i-s\RedirectedFolders\j\My Documents\Arduino\l\l.ino:661: confused by earlier errors, bailing out

lto-wrapper: C:\Users\j.i\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-gcc returned 1 exit status

c:/users/j.i/appdata/local/arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

Using library ArtGuardLibs in folder: \\i-s\RedirectedFolders\j\My Documents\Arduino\libraries\ArtGuardLibs (legacy)
Using library Wire at version 1.0 in folder: C:\Users\j.i\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\libraries\Wire 
Using library LoRaWAN_library_arduino_v1_2 in folder: \\i-s\RedirectedFolders\j\My Documents\Arduino\libraries\LoRaWAN_library_arduino_v1_2 (legacy)
Using library SPI at version 1.0 in folder: C:\Users\j.i\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\libraries\SPI 
exit status 1
unable to find a register to spill in class 'NO_REGS'

If I go to that line, it’s just a bracket…

...

 //////////////////////////////////////////////
  // 14. Save configuration
  //////////////////////////////////////////////

  error = LoRaWAN.saveConfig();

  // Check status
  if( error != 0 )
  {
    digitalWrite(_LED, _ON);
  }


  //////////////////////////////////////////////
  // 2. Join network
  //////////////////////////////////////////////

  error = LoRaWAN.joinABP();

  // Check status
  if( error != 0 )
  {
    //2. Join network error
    digitalWrite(_LED, _ON);
    Serial.println("Error joining to ABP");
  }

} //// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< LINE 661


// prepare the data into a packet
// now we have an array of data that is in global space
//

void prepare(unsigned char PayLoadType)
{}

How can I avoid/solve this issue?

Thanks again,

PS: I am using ARduino IDE 1.6.11 with AVR Boards 1.6.14 on Windows 7

Arduino AVR Boards 1.6.14 uses the same version of AVR-GCC as Arduino AVR Boards 1.6.12, the package you had the problem with previously. As for the exact cause or real solution, I don’t know. In the first report of this error I saw we determined that it still occurred even without LTO. As before, installing Arduino AVR boards 1.6.11 should make it go away by reverting from AVR-GCC 4.9.2 to AVR-GCC 4.8.1.

pert: Arduino AVR Boards 1.6.14 uses the same version of AVR-GCC as Arduino AVR Boards 1.6.12, the package you had the problem with previously. As for the exact cause or real solution, I don't know. In the first report of this error I saw we determined that it still occurred even without LTO. As before, installing Arduino AVR boards 1.6.11 should make it go away by reverting from AVR-GCC 4.9.2 to AVR-GCC 4.8.1.

Thanks again pert, I was thinking of doing so, but I was also hoping that a more "offcial" solution might have been found... I will move my AVR board to 1.6.11 in the maintime.

Thanks again