When trying to bootstrap gcc 3.4.0 20040301, I get an error like this: /usr/local/src/branch/gcc/gcc/gcc.c:3661: error: assignment of read-only location /usr/local/src/branch/gcc/gcc/gcc.c:3663: error: assignment of read-only location See http://gcc.gnu.org/ml/gcc/2004-03/msg00041.html . Andrew Pinski commented in http://gcc.gnu.org/ml/gcc/2004-03/msg00043.html This is a bug in gcc.c. Basically argv is declared as const but is changeable if HAVE_TARGET_EXECUTABLE_SUFFIX or HAVE_TARGET_OBJECT_SUFFIX are defined. Please file a bug with this analysis. Done.
Already confirmed by me.
We're getting this because I fixed the compiler to issue this error message in the process of fixing another PR. I'll make the obvious fixes to gcc.c. (It's good we found this; it's an optimization bug waiting to happen.)
Subject: Bug 14356 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: mmitchel@gcc.gnu.org 2004-03-02 05:57:12 Modified files: gcc : ChangeLog gcc.c gcc/cp : ChangeLog Log message: PR bootstrap/14356 * gcc.c (process_command): Remove const-qualification from argv. (main): Likewise. 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.270&r2=2.2326.2.271 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gcc.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.403.4.3&r2=1.403.4.4 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.68&r2=1.3892.2.69
Fixed in GCC 3.4.
Subject: Bug 14356 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2004-03-02 05:59:30 Modified files: gcc : ChangeLog gcc.c Log message: PR bootstrap/14356 * gcc.c (process_command): Remove const-qualification from argv. (main): Likewise. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.2990&r2=2.2991 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gcc.c.diff?cvsroot=gcc&r1=1.408&r2=1.409
Subject: Bug 14356 CVSROOT: /cvs/gcc Module name: gcc Branch: tree-ssa-20020619-branch Changes by: pinskia@gcc.gnu.org 2004-03-04 16:30:44 Modified files: gcc : ChangeLog Log message: Remove the follow entries as they are mentioned twice: Index: ChangeLog =================================================================== RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v retrieving revision 1.14646.2.146 diff -u -p -r1.14646.2.146 ChangeLog --- ChangeLog 4 Mar 2004 16:21:30 -0000 1.14646.2.146 +++ ChangeLog 4 Mar 2004 16:28:13 -0000 @@ -459,23 +459,6 @@ * Makefile.in (install-libgcc, install-multilib): Pass mkinstalldirs var to libgcc.mk. - -2004-02-28 Andrew Pinski <pinskia@physics.uc.edu> - - * config/darwin.h (machopic_finish): Output stub even if the - symbol is already defined. - -2004-02-27 Dale Johannesen <dalej@apple.com> - - * config/darwin.c (machopic_output_possible_stub_label): Remove. - config/darwin-protos.h: Ditto. - config/darwin.h: Remove call to it. - -2004-02-27 Dale Johannesen <dalej@apple.com> - - * combine.c (distribute_notes): Do not place a REG_DEAD note - when value is both set and used. - 2004-03-01 Mark Mitchell <mark@codesourcery.com> PR bootstrap/14356 Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.14646.2.146&r2=1.14646.2.147
Subject: Bug 14356 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: kcook@gcc.gnu.org 2004-03-25 00:58:39 Modified files: gcc : ChangeLog gcc.c Log message: 2004-03-24 Kelley Cook <kcook@gcc.gnu.org> Backport: 2004-03-01 Mark Mitchell <mark@codesourcery.com> PR bootstrap/14356 * gcc.c (process_command): Remove const-qualification from argv. (main): Likewise. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.951&r2=1.16114.2.952 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gcc.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.350.2.10&r2=1.350.2.11