[chill patch] bootstrap failure

Nathan Sidwell nathan@acm.org
Fri Feb 11 07:23:00 GMT 2000


Hi,
Attached is what looks like the obvious patch to fix new bootstrap
failings of the chill compiler. tree.h now declares maximum_field_alignment
as unsigned int and chill is scattered with local declarations of
that extern as plain int.

ok?

nathan
-- 
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
Never hand someone a gun unless you are sure where they will point it
nathan@acm.org  http://www.cs.bris.ac.uk/~nathan/  nathan@cs.bris.ac.uk
2000-02-11  Nathan Sidwell  <nathan@acm.org>

	* decl.c (init_decl_processing): Don't locally declare
	extern set_alignment.
	* expr.c (compare_records): Don't locally declare extern
	maximum_field_alignment.
	* inout.c (inout_init): Likewise. Adjust.
	(build_chill_gettextaccess): Likewise.
	(build_enum_tables): Likewise.
	* satisfy.c (satisfy): Likewise.
	* tasking.c (build_tasking_struct): Likewise.
	(build_tasking_message_type): Likewise.
	* typeck.c (build_init_struct): Likewise.

Index: ch/decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/decl.c,v
retrieving revision 1.17
diff -c -3 -p -r1.17 decl.c
*** decl.c	2000/01/17 16:49:30	1.17
--- decl.c	2000/02/11 15:14:32
*************** init_decl_processing ()
*** 3400,3407 ****
    tree ptr_ftype_luns_ptr_int;
    tree double_ftype_double;
  
-   extern int set_alignment;
- 
    /* allow 0-255 enums to occupy only a byte */
    flag_short_enums = 1;
  
--- 3400,3405 ----
Index: ch/expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/expr.c,v
retrieving revision 1.15
diff -c -3 -p -r1.15 expr.c
*** expr.c	2000/01/17 16:49:30	1.15
--- expr.c	2000/02/11 15:14:37
*************** compare_records (exp0, exp1)
*** 3469,3475 ****
    int have_variants = 0;
  
    tree result = boolean_true_node;
-   extern int maximum_field_alignment;
  
    if (TREE_CODE (type) != RECORD_TYPE)
      abort ();
--- 3469,3474 ----
Index: ch/inout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/inout.c,v
retrieving revision 1.12
diff -c -3 -p -r1.12 inout.c
*** inout.c	2000/01/17 16:49:30	1.12
--- inout.c	2000/02/11 15:14:41
*************** inout_init ()
*** 1088,1095 ****
    /* We temporarily reset the maximum_field_alignment to zero so the
       compiler's init data structures can be compatible with the
       run-time system, even when we're compiling with -fpack. */
!   extern int maximum_field_alignment;
!   int save_maximum_field_alignment = maximum_field_alignment;
  
    extern tree chill_predefined_function_type;
    tree endlink = void_list_node;
--- 1088,1094 ----
    /* We temporarily reset the maximum_field_alignment to zero so the
       compiler's init data structures can be compatible with the
       run-time system, even when we're compiling with -fpack. */
!   unsigned int save_maximum_field_alignment = maximum_field_alignment;
  
    extern tree chill_predefined_function_type;
    tree endlink = void_list_node;
*************** build_chill_gettextaccess (text)
*** 2821,2828 ****
    tree access, refaccess, acc, decl, listbase;
    tree tlocmode, indexmode, dynamic;
    tree result;
!   extern int maximum_field_alignment;
!   int save_maximum_field_alignment = maximum_field_alignment;
  
    if (! check_text (text, 1, "GETTEXTACCESS"))
      return error_mark_node;
--- 2820,2826 ----
    tree access, refaccess, acc, decl, listbase;
    tree tlocmode, indexmode, dynamic;
    tree result;
!   unsigned int save_maximum_field_alignment = maximum_field_alignment;
  
    if (! check_text (text, 1, "GETTEXTACCESS"))
      return error_mark_node;
*************** void build_enum_tables ()
*** 4590,4597 ****
    /* We temporarily reset the maximum_field_alignment to zero so the
       compiler's init data structures can be compatible with the
       run-time system, even when we're compiling with -fpack. */
!   extern int maximum_field_alignment;
!   int save_maximum_field_alignment;
      
    if (pass == 1)
      return;
--- 4588,4594 ----
    /* We temporarily reset the maximum_field_alignment to zero so the
       compiler's init data structures can be compatible with the
       run-time system, even when we're compiling with -fpack. */
!   unsigned int save_maximum_field_alignment;
      
    if (pass == 1)
      return;
Index: ch/lang.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/lang.c,v
retrieving revision 1.11
diff -c -3 -p -r1.11 lang.c
*** lang.c	2000/01/17 16:49:30	1.11
--- lang.c	2000/02/11 15:14:41
*************** int special_UC = 0;
*** 50,57 ****
  char* chill_real_input_filename;
  extern FILE* finput;
  
- extern int maximum_field_alignment;
- 
  static int deep_const_expr			PARAMS ((tree));
  static void chill_print_error_function		PARAMS ((const char *));
  
--- 50,55 ----
Index: ch/satisfy.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/satisfy.c,v
retrieving revision 1.10
diff -c -3 -p -r1.10 satisfy.c
*** satisfy.c	2000/01/17 16:49:30	1.10
--- satisfy.c	2000/02/11 15:14:41
*************** satisfy (exp, chain)
*** 533,540 ****
  	    /* if we have an ACCESS or TEXT mode we have to set
  	       maximum_field_alignment to 0 to fit with runtime
  	       system, even when we compile with -fpack. */
! 	    extern int maximum_field_alignment;
! 	    int save_maximum_field_alignment = maximum_field_alignment;
  
  	    if (CH_IS_ACCESS_MODE (exp) || CH_IS_TEXT_MODE (exp))
  	      maximum_field_alignment = 0;
--- 533,539 ----
  	    /* if we have an ACCESS or TEXT mode we have to set
  	       maximum_field_alignment to 0 to fit with runtime
  	       system, even when we compile with -fpack. */
! 	    unsigned int save_maximum_field_alignment = maximum_field_alignment;
  
  	    if (CH_IS_ACCESS_MODE (exp) || CH_IS_TEXT_MODE (exp))
  	      maximum_field_alignment = 0;
Index: ch/tasking.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/tasking.c,v
retrieving revision 1.14
diff -c -3 -p -r1.14 tasking.c
*** tasking.c	2000/01/17 16:49:30	1.14
--- tasking.c	2000/02/11 15:14:43
*************** build_tasking_struct ()
*** 763,770 ****
    /* We temporarily reset the maximum_field_alignment to zero so the
       compiler's init data structures can be compatible with the
       run-time system, even when we're compiling with -fpack. */
!   extern int maximum_field_alignment;
!   int save_maximum_field_alignment = maximum_field_alignment;
    maximum_field_alignment = 0;
  
    decl1 = build_decl (FIELD_DECL, get_identifier ("TaskName"),
--- 763,769 ----
    /* We temporarily reset the maximum_field_alignment to zero so the
       compiler's init data structures can be compatible with the
       run-time system, even when we're compiling with -fpack. */
!   unsigned int save_maximum_field_alignment = maximum_field_alignment;
    maximum_field_alignment = 0;
  
    decl1 = build_decl (FIELD_DECL, get_identifier ("TaskName"),
*************** build_tasking_message_type ()
*** 1239,1246 ****
    tree temp;
    /* We temporarily reset maximum_field_alignment to deal with
       the runtime system. */
!   extern int maximum_field_alignment;
!   int save_maximum_field_alignment = maximum_field_alignment;
    tree field1, field2, field3;
  
    maximum_field_alignment = 0;
--- 1238,1244 ----
    tree temp;
    /* We temporarily reset maximum_field_alignment to deal with
       the runtime system. */
!   unsigned int save_maximum_field_alignment = maximum_field_alignment;
    tree field1, field2, field3;
  
    maximum_field_alignment = 0;
Index: ch/typeck.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/typeck.c,v
retrieving revision 1.19
diff -c -3 -p -r1.19 typeck.c
*** typeck.c	2000/01/17 16:49:30	1.19
--- typeck.c	2000/02/11 15:14:45
*************** build_init_struct ()
*** 2168,2175 ****
    /* We temporarily reset the maximum_field_alignment to zero so the
       compiler's init data structures can be compatible with the
       run-time system, even when we're compiling with -fpack. */
!   extern int maximum_field_alignment;
!   int save_maximum_field_alignment = maximum_field_alignment;
    maximum_field_alignment = 0;
  
    decl1 = build_decl (FIELD_DECL, get_identifier ("__INIT_ENTRY"),
--- 2168,2174 ----
    /* We temporarily reset the maximum_field_alignment to zero so the
       compiler's init data structures can be compatible with the
       run-time system, even when we're compiling with -fpack. */
!   unsigned int save_maximum_field_alignment = maximum_field_alignment;
    maximum_field_alignment = 0;
  
    decl1 = build_decl (FIELD_DECL, get_identifier ("__INIT_ENTRY"),


More information about the Gcc-patches mailing list