This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

[Patch, fortran] PR32302 - [4.2/4.3 Regression] Incorrect result with -O2


:ADDPATCH fortran:

This was one of those happy moments where the solution came when I
turned to something else.  I notice that I did not add the PR number
to my previous posting - sorry!

Apparently, somewhere in the optimizer, the TREE_TYPE for the common
block declaration needs to be consistent with the size given by the
declaration.  This leads to the attached one line fix.  The testcase
is the reporter's, suitable embellished with DejaGnuery.

Regtested on Cygwin_NT/PIV - OK for trunk and 4.2?

Paul

2007-06-14 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/32302
	* trans-common.c (build_common_decl): If resizing of common
	decl is needed, update the TREE_TYPE.

2007-06-14 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/32302
	* gfortran.dg/common_resize_1.f90: New test.

Attachment: pr32302.diff
Description: Text document


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