The backend outputs invalid assembly containing full function signatures when compiling C++ sources with -ffunction-sections: ldi r30,pm_lo8(.L_bool updateEEParam(uint16_t, uint8_t*)_body) I'm not sure this is AVR specific, but it doesn't certainly happen on i386-linux.
Oops, this PR should have been about "-mcall-prologues", not "-ffunction-sections".
You should not use: const char *cfun_name = current_function_name ();
Subject: Bug 18551 CVSROOT: /cvs/gcc Module name: gcc Changes by: marekm@gcc.gnu.org 2005-03-20 21:12:09 Modified files: gcc : ChangeLog gcc/config/avr : avr.c Log message: PR target/18551 * config/avr/avr.c (avr_output_function_prologue): Do not use current_function_name() in a label, use a local label instead. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7922&r2=2.7923 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/avr/avr.c.diff?cvsroot=gcc&r1=1.131&r2=1.132
Subject: Bug 18551 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: marekm@gcc.gnu.org 2005-03-20 21:13:13 Modified files: gcc : ChangeLog gcc/config/avr : avr.c Log message: PR target/18551 * config/avr/avr.c (avr_output_function_prologue): Do not use current_function_name() in a label, use a local label instead. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.69&r2=2.7592.2.70 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/avr/avr.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.129.6.1&r2=1.129.6.2
Subject: Bug 18551 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: marekm@gcc.gnu.org 2005-03-20 21:14:28 Modified files: gcc : ChangeLog gcc/config/avr : avr.c Log message: PR target/18551 * config/avr/avr.c (avr_output_function_prologue): Do not use current_function_name() in a label, use a local label instead. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.823&r2=2.2326.2.824 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/avr/avr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.108.4.5&r2=1.108.4.6
Fixed. Please as normal send the patch to gcc-patches@.