Wolfgang Gellerich - [PATCH] fixes Fortran parameter passing problem for 4.1 (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: Wolfgang Gellerich
- To: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 7 Feb 2007 11:09:01 +0100
- Subject: [PATCH] fixes Fortran parameter passing problem for 4.1
Hello Everyone!
In September I fixed a tiny problem in the F90 front end, and the patch was integrated into the head.
However, the problem also occurs in the 4.1 branch. It causes regression testcase char_result_6.f90 to fail on s390. Since the bug causes the optimizer to ignore an existing data dependence, it might also affect any other platform under unlucky (does one say so ?-:) circumstances.
Therefore, I backported the patch to the head of the 4.1 branch. The Patch fixes the problem on s390 and causes no new failures.
The original patch and a detailed analysis of the problem is found here:
http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00450.html
With best regards,
Wolfgang Gellerich
----------------snip---------------snip------------snip-------------
2007-02-07 Wolfgang Gellerich gellerich@de.ibm.com
* trans-expr.c (gfc_add_interface_mapping): For characters, dereference
pointer if necessary and then perform the cast.
----------------snip---------------snip------------snip-------------
*** trans-expr.c 2007-02-06 17:33:26.000000000 +0100 --- trans-expr.c-fixed 2007-02-06 17:32:01.000000000 +0100 *************** gfc_add_interface_mapping (gfc_interface *** 1369,1380 **** { tmp = gfc_get_character_type_len (sym->ts.kind, NULL); tmp = build_pointer_type (tmp);
if (sym->attr.pointer)
tmp = build_pointer_type (tmp);
value = fold_convert (tmp, se->expr); if (sym->attr.pointer)
! value = gfc_build_indirect_ref (value); }
/* If the argument is a scalar or a pointer to an array, dereference it. */
--- 1369,1380 ---- { tmp = gfc_get_character_type_len (sym->ts.kind, NULL); tmp = build_pointer_type (tmp);
if (sym->attr.pointer)
! value = gfc_build_indirect_ref (se->expr); ! else ! value = se->expr; ! value = fold_convert (tmp, value); }
/* If the argument is a scalar or a pointer to an array, dereference it. */
- Follow-Ups:
- Re: [PATCH] fixes Fortran parameter passing problem for 4.1
* From: Mike Stump
- Re: [PATCH] fixes Fortran parameter passing problem for 4.1
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |