This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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]

Re: [Patch, fortran] PR48955 [4.6/4.7 Regression] Wrong result for array assignment due to missing temporary


On 05/12/2011 05:46 PM, Paul Richard Thomas wrote:
This patch fixes the problem in two steps:
(i) It reverts r162289; and
(ii) It adds the correct initialization for loop.reverse[] in
gfc_trans_assignment_1.  This was implemented incorrectly in the fix
for PR24524 (in spite of the correct comment in dependency.c!) and
removed at sometime, I do not know why.
Bootstraps and regtests on x86_64/FC9.  OK for trunk and 4.6?

Looks OK - unless Thomas has objections.


I would prefer if you could credit Kacper Kowalik for the example - he reported it on IRC (and CCed himself to the PR after I reported it.) I only relayed the example and did some minor analysis.

Tobias

PS: Regarding regressions, I think gfortran is doing fine - ignoring the restricted pointer PR 45586. What are your next plans for gfortran? I wouldn't mind if you could fix PR 47674 - it always pops up as only testsuite failure when I regtest. Though, as the test case never worked, I am not sure whether one can classify it as regression or not. (You may need valgrind to reproduce the failure.)

2011-05-12 Paul Thomas<pault@gcc.gnu.org>

	PR fortran/48955
	* dependency.c (gfc_dep_resolver): Revert r162829 which changed
	the condition for setting this_dep to GFC_DEP_OVERLAP.
	* trans-expr.c (gfc_trans_assignment_1): Enable loop reversal.

2011-05-12 Paul Thomas<pault@gcc.gnu.org>

	PR fortran/48955
	* gfortran.dg/dependency_40.f90 : New test.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]