From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5033 invoked by alias); 9 Aug 2006 14:29:44 -0000 Received: (qmail 5006 invoked by uid 48); 9 Aug 2006 14:29:36 -0000 Date: Wed, 09 Aug 2006 14:29:00 -0000 Message-ID: <20060809142936.5005.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/28600] [4.2 regression] ICE on character pointer assignment In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-08/txt/msg00669.txt.bz2 List-Id: ------- Comment #5 from jakub at gcc dot gnu dot org 2006-08-09 14:29 ------- It was caused by the openmp changes, but guess usually the parent routine at least touches the dummy argument and therefore it would be added to the right context. I was testing: --- trans-decl.c.jj 2006-08-09 15:39:36.000000000 +0200 +++ trans-decl.c 2006-08-09 15:44:35.000000000 +0200 @@ -884,7 +884,10 @@ gfc_get_symbol_decl (gfc_symbol * sym) if (TREE_CODE (length) == VAR_DECL && DECL_CONTEXT (length) == NULL_TREE) { - gfc_add_decl_to_function (length); + if (sym->ns->proc_name->backend_decl == current_function_decl) + gfc_add_decl_to_function (length); + else + gfc_add_decl_to_parent_function (length); gfc_defer_symbol_init (sym); } } before I saw Paul's patch on gcc-patches, guess both versions will DTRT. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28600