re PR target/81305 ([avr] avrtiny uses LDS for SREG in ISR routines which is out...
authorGeorg-Johann Lay <avr@gjlay.de>
Thu, 6 Jul 2017 15:31:42 +0000 (15:31 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Thu, 6 Jul 2017 15:31:42 +0000 (15:31 +0000)
PR target/81305
* gcc.target/avr/isr-test.h: Fix warnings.

From-SVN: r250029

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/avr/isr-test.h

index 1a838952269744052ccfd4fa1ab218116fee6929..59ab5aaf446f8081204a45d3621f224e2cb5c196 100644 (file)
@@ -1,3 +1,8 @@
+2017-07-06  Georg-Johann Lay  <avr@gjlay.de>
+
+       PR target/81305
+       * gcc.target/avr/isr-test.h: Fix warnings.
+
 2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
        * lib/target-supports.exp: Generate
index 2d2babe215093e18e41d4bdf73044c7e747b4411..464348107f7c097411903c67aec809082f10ae55 100644 (file)
@@ -40,14 +40,14 @@ typedef struct
 
 regs_t reginfo1, reginfo2;
 
-__attribute__((noinline))
+__attribute__((noinline,unused))
 static void clear_reginfo (void)
 {
   memset (reginfo1.sfrs, 0, sizeof (reginfo1.sfrs));
   memset (reginfo2.sfrs, 0, sizeof (reginfo2.sfrs));
 }
 
-__attribute__((noinline))
+__attribute__((noinline,unused))
 static void compare_reginfo (unsigned long gpr_ignore)
 {
   signed char regno;
@@ -68,6 +68,7 @@ static void compare_reginfo (unsigned long gpr_ignore)
       if (*preg1 != *preg2)
         {
           static signed char volatile failed_regno;
+          (void) failed_regno;
           failed_regno = regno;
           __builtin_abort();
         }