From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7546 invoked by alias); 11 May 2005 08:11:13 -0000 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 Received: (qmail 7076 invoked by uid 48); 11 May 2005 08:10:56 -0000 Date: Wed, 11 May 2005 08:11:00 -0000 Message-ID: <20050511081056.7075.qmail@sourceware.org> From: "fxcoudert at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040825220057.17192.tobi@gcc.gnu.org> References: <20040825220057.17192.tobi@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug fortran/17192] Functions returning character pointer via argument are broken X-Bugzilla-Reason: CC X-SW-Source: 2005-05/txt/msg01482.txt.bz2 List-Id: ------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-05-11 08:10 ------- It does still compile, but does still not return the right answer. The problem disappears if "integer" is used instead of "character*5". The tree dump (obtained with -fdump-tree-original) is: s (__result, .__result, e, d, _e, _d) { _gfortran_copy_string (5, e, 5, d); __result = (char[1:5] * &) &c; MAIN__ () { char c[1:5]; char[1:5] * p; static void s (char[1:5] * &, int4, char[1:5] &, char[1:5] &, int4, int4); _gfortran_copy_string (5, &c, 5, "Hallo"); p = (char[1:5] *) &c; { char str.0[5]; s ((char[1:5] *) &str.0, 5, &c, p, 5, 5); _gfortran_copy_string (5, &c, 5, (char[1:5] *) &str.0); } /* ...snip... call output routines */ } -- What |Removed |Added ---------------------------------------------------------------------------- Keywords|ice-on-valid-code | Last reconfirmed|2004-11-11 05:20:44 |2005-05-11 08:10:52 date| | Summary|Functions returning pointer |Functions returning |via argument are broken |character pointer via | |argument are broken http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17192