This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29371] Coredump when using -fbounds-check with pointer & nullify
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Oct 2006 20:43:23 -0000
- Subject: [Bug fortran/29371] Coredump when using -fbounds-check with pointer & nullify
- References: <bug-29371-1719@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pault at gcc dot gnu dot org 2006-10-11 20:43 -------
Created an attachment (id=12412)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12412&action=view)
The correct fix for this PR
THis turns out to be completely specific to nullify, or to a pointer assign to
NULL(). Looking at the code for pointer assignment, we immediately see that
the descriptor data set is being added to the block, FOLLOWED by the pre and
post blocks. Since -fbounds-check fixes the value of the index in the pre
block, the net result is an index that is used before it is set. The fix adds
the data set to the pre block, thereby putting things in the right order.
I'll just regtest this and then submit it.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #12395|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29371