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]

[PATCH] Fix subref_array_pointer_2.f90 regression


Hi!

The
4.5 http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156512
4.4 http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156554
checkins caused following regression on the 4.4 branch:
FAIL: gfortran.dg/subref_array_pointer_2.f90  -O3 -g  (internal compiler error)
FAIL: gfortran.dg/subref_array_pointer_2.f90  -O3 -g  (test for excess errors)
WARNING: gfortran.dg/subref_array_pointer_2.f90  -O3 -g  compilation failed to produce executable
, under valgrind it fails with all options and on both trunk and 4.4 branch.

The problem is info->dimen access after gfc_cleanup_loop freed what info
points to.

The following patches (trunk first, then 4.4 branch) fix this.
Alternatively the gfc_cleanup_loop calls could be moved after the
if (formal_ptr) {...} hunk.

Ok for trunk/4.4 (or the alternative)?

	Jakub

Attachment: Y541
Description: Text document

Attachment: Y541a
Description: Text document


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