diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2011-09-21 09:40:13 +0000 |
---|---|---|
committer | Georg-Johann Lay <gjl@gcc.gnu.org> | 2011-09-21 09:40:13 +0000 |
commit | e3e285857d96da68abc12b8e6ff6a585ed3b8b5c (patch) | |
tree | e0410b20d0f0dc82544668d5e6122cd8e0a5135f | |
parent | 88cb6dd2564ee0d1d32cc776f1c9ab3f32a27ac8 (diff) | |
download | gcc-e3e285857d96da68abc12b8e6ff6a585ed3b8b5c.zip gcc-e3e285857d96da68abc12b8e6ff6a585ed3b8b5c.tar.gz gcc-e3e285857d96da68abc12b8e6ff6a585ed3b8b5c.tar.bz2 |
re PR target/45099 ([avr] Warning could be issued for use of register variables that will fail.)
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 663319d..036fdde 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 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 PR target/50465 * config/avr/avr.md (adjust_len): New insn attribute. diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 9fee0d0..42bc6f3 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -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) |