re PR target/45099 ([avr] Warning could be issued for use of register variables that...
authorGeorg-Johann Lay <avr@gjlay.de>
Wed, 21 Sep 2011 09:40:13 +0000 (09:40 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Wed, 21 Sep 2011 09:40:13 +0000 (09:40 +0000)
PR target/45099
* config/avr/avr.c (avr_function_arg_advance): Change error to
warning if a fixed register is needed as function argument.

From-SVN: r179040

gcc/ChangeLog
gcc/config/avr/avr.c

index 663319d92f0c2c274c52fb9d8c746529429f476b..036fddeebbb58ddc07b217ad7aa20c5d17fe7a0a 100644 (file)
@@ -1,3 +1,9 @@
+2011-09-21  Georg-Johann Lay  <avr@gjlay.de>
+
+       PR target/45099
+       * config/avr/avr.c (avr_function_arg_advance): Change error to
+       warning if a fixed register is needed as function argument.
+
 2011-09-21  Georg-Johann Lay  <avr@gjlay.de>
 
        PR target/50449
index 9fee0d0512023d216bf6a965bef0acae8b15bfb4..42bc6f3fa352f1309001601f801fbf2cb0e5885b 100644 (file)
@@ -1810,7 +1810,7 @@ avr_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
 
   /* Test if all registers needed by the ABI are actually available.  If the
      user has fixed a GPR needed to pass an argument, an (implicit) function
-     call would clobber that fixed register.  See PR45099 for an example.  */
+     call will clobber that fixed register.  See PR45099 for an example.  */
   
   if (cum->regno >= 8
       && cum->nregs >= 0)
@@ -1819,8 +1819,8 @@ avr_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
 
       for (regno = cum->regno; regno < cum->regno + bytes; regno++)
         if (fixed_regs[regno])
-          error ("Register %s is needed to pass a parameter but is fixed",
-                 reg_names[regno]);
+          warning (0, "fixed register %s used to pass parameter to function",
+                   reg_names[regno]);
     }
       
   if (cum->nregs <= 0)