------- 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