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]

Re: ICE980331 *2 with egcs-2.91.47 19980710


> I've put 2 more cases of "internal compiler error 980331" on
> http://homepages.munich.netsurf.de/Franz.Sirl/misc
>
> They are named htmlview.ii and FOTBuilder.ii. You have to compile
> with -O2 to see the bug.

Thanks for the report. I could reproduce it on i486-pc-linux-gnu,
which is rather lucky as it is an off-by-one error in some only
remotely related code.

The patch below fixes it for me.

Jeff, isn't the bitfield at offset 2??? Also, I could rewrite this
as using push_obstacks/pop_obstacks.

Regards,
Martin

1998-07-11  Martin von Löwis  <loewis@informatik.hu-berlin.de>

	* search.c (my_tree_cons): The bitfield is at index 2.

Index: search.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/search.c,v
retrieving revision 1.36
diff -c -p -r1.36 search.c
*** search.c	1998/06/13 23:34:55	1.36
--- search.c	1998/07/11 08:25:32
*************** my_tree_cons (purpose, value, chain)
*** 266,272 ****
    /* The type of the last on the LHS of this statement must be a pointer
       to the same type as the bitfields in struct tree_common.  Otherwise
       we may write beyond our intended area.  */
!   ((unsigned *)p)[3] = 0;
    TREE_SET_CODE (p, TREE_LIST);
    TREE_PURPOSE (p) = purpose;
    TREE_VALUE (p) = value;
--- 266,272 ----
    /* The type of the last on the LHS of this statement must be a pointer
       to the same type as the bitfields in struct tree_common.  Otherwise
       we may write beyond our intended area.  */
!   ((unsigned *)p)[2] = 0;
    TREE_SET_CODE (p, TREE_LIST);
    TREE_PURPOSE (p) = purpose;
    TREE_VALUE (p) = value;


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