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]

Re: gfc_array_range_type being garbage collected?


On Thursday 28 July 2005 06:22, Asher Langton wrote:
> Hi,
>
> I've come across a strange bug while preparing the Cray pointer patch
> for release.  In a large test program, I get an ICE due to
> gfc_array_range_type being overwritten prior to being used in
> gfc_get_array_type_bounds.  This only happens with a sufficiently
> large program, and it appears that gfc_array_range_type is being
> garbage collected:
>
> Hardware watchpoint 6: *1073909760
> (gdb) cont
>   MAIN__ loctest ptrparms pteparm1 ptr1 ptr2 ptr3 ptr4 ptr5 ptr6 {GC
> 5429k -> Hardware watchpoint 6: *1073909760
>
> Old value = 0
> New value = -1515870811
> 0x001d9c77 in memset () from /lib/tls/libc.so.6
>
> This happens while translating a Cray pointee, but I don't think it's
> related; the same subroutine compiles and runs fine in a smaller
> program.  Does anybody have an idea what could be happening?

gfc_array_range_type is being garbage collected :-)

Try this patch.

Gr.
Steven

	* trans-types.h (gfc_array_range_type): Add missing GTY.

Index: trans-types.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/trans-types.h,v
retrieving revision 1.10
diff -u -3 -p -r1.10 trans-types.h
--- trans-types.h	25 Jun 2005 00:40:36 -0000	1.10
+++ trans-types.h	28 Jul 2005 09:05:47 -0000
@@ -41,10 +41,12 @@ enum
 };
 
 extern GTY(()) tree gfc_array_index_type;
+extern GTY(()) tree gfc_array_range_type;
 extern GTY(()) tree gfc_character1_type_node;
 extern GTY(()) tree ppvoid_type_node;
 extern GTY(()) tree pvoid_type_node;
 extern GTY(()) tree pchar_type_node;
+
 /* This is the type used to hold the lengths of character variables.
    It must be the same as the corresponding definition in gfortran.h.  */
 /* TODO: This is still hardcoded as kind=4 in some bits of the compiler


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