From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29111 invoked by alias); 20 Jun 2007 16:27:58 -0000 Received: (qmail 28991 invoked by alias); 20 Jun 2007 16:27:41 -0000 Date: Wed, 20 Jun 2007 16:27:00 -0000 Message-ID: <20070620162740.28990.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/31809] [4.1 Regression] sometimes TREE_READONLY is still set for non read only variables causing wrong code In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mueller at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg01729.txt.bz2 ------- Comment #11 from mueller at gcc dot gnu dot org 2007-06-20 16:27 ------- Subject: Bug 31809 Author: mueller Date: Wed Jun 20 16:27:23 2007 New Revision: 125887 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125887 Log: 2007-06-20 Dirk Mueller PR c++/31809 PR c++/31806 Backport from mainline: 2007-05-31 Jakub Jelinek * decl.c (cp_finish_decl): Also clear was_readonly if a static var needs runtime initialization. 2007-05-30 Jakub Jelinek * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC variables that need runtime initialization. * g++.dg/opt/static5.C: New testcase * g++.dg/opt/static6.C: Likewise Added: branches/gcc-4_1-branch/gcc/testsuite/g++.dg/opt/static5.C branches/gcc-4_1-branch/gcc/testsuite/g++.dg/opt/static6.C Modified: branches/gcc-4_1-branch/gcc/cp/ChangeLog branches/gcc-4_1-branch/gcc/cp/decl.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31809