[gnu.gcc.bug] Problem with -gg.

karl@ra.umb.edu ("Karl Berry.") (11/27/88)

% gcc -gg -c test.c
gcc: Program cc1 got fatal signal 6.

If the -gg is replaced by -g, all is fine.
test.c is the following (rather large, sorry) file.

Karl.    karl@umb.edu

# 1 "write_gf.c"
 





# 1 "../include/gf.h"



 

# 1 "../include/types.h"



 

typedef unsigned char one_byte;
typedef char signed_byte;
typedef unsigned short two_bytes;
typedef short signed_2_bytes;
typedef unsigned int four_bytes;
typedef int signed_4_bytes;
typedef int byte_count_type;





typedef double real;
typedef long int scaled;
typedef long int fix_word;

typedef int file_descriptor_type;
typedef void *address;
typedef char *string;

typedef enum {false=0, true=1} boolean;




# 6 "../include/gf.h"

# 1 "../include/generic.h"



# 1 "../include/types.h"
# 30 "../include/types.h"

# 4 "../include/generic.h"


 


 


typedef struct {
	signed_4_bytes max_row, min_row;
	signed_4_bytes max_col, min_col;
}  bounding_box_type;

 


typedef struct {
   one_byte char_code;
   signed_4_bytes h_escapement;
   fix_word tfm_width;
} character_locator;


 
typedef unsigned char matrix_element_type; 	 
typedef matrix_element_type ** matrix_type;

typedef unsigned short matrix_index_type;


 







typedef struct {
   four_bytes char_code;
   matrix_type bitmap;
   signed_4_bytes h_escapement;
   fix_word tfm_width;
   bounding_box_type char_bb;
   string string_special;		 
   scaled * numeric_special;		 
} generic_char_type;


# 7 "../include/gf.h"


 



extern boolean open_gf_input_file( );
extern void close_gf_input_file();

extern boolean open_gf_output_file( );
extern void close_gf_output_file();

 
extern string get_gf_preamble();
extern void put_gf_preamble( );

 

typedef struct {
   fix_word design_size;  
   unsigned h_resolution, v_resolution;  
   bounding_box_type font_bb;  
   character_locator char_loc[256 ];
   string string_special;		 
   scaled * numeric_special;		 
} gf_postamble_type;

extern gf_postamble_type get_gf_postamble();
extern void put_gf_postamble( 
);

 





typedef generic_char_type gf_char_type;

extern generic_char_type get_gf_char( );
extern void put_gf_char( );

 
extern matrix_type allocate_gf_bitmap( 
);

 




typedef enum {NO_COLOR = -1, WHITE = 0, BLACK = 1} color_type;



extern color_type get_pixel_at( 
);

extern void set_pixel_at( 
);


# 7 "write_gf.c"

# 1 "../gf/private_gf.h"
 








# 1 "../include/global.h"
 








# 1 "/usr/include/stdio.h"
 




extern	struct	_iobuf {
	int	_cnt;
	unsigned char *_ptr;
	unsigned char *_base;
	int	_bufsiz;
	short	_flag;
	char	_file;		 
} _iob[];




























extern struct _iobuf 	*fopen();
extern struct _iobuf 	*fdopen();
extern struct _iobuf 	*freopen();
extern struct _iobuf 	*popen();
extern struct _iobuf 	*tmpfile();
extern long	ftell();
extern char	*fgets();
extern char	*gets();



extern char	*ctermid();
extern char	*cuserid();
extern char	*tempnam();
extern char	*tmpnam();






# 10 "../include/global.h"

# 1 "/usr/include/sys/file.h"
 







# 1 "/usr/include/sys/fcntl.h"
 
 








 












 







 











 





 
 





 





 
struct flock {
        short   l_type;		 
        short   l_whence;	 
        long    l_start;	 
        long    l_len;           
        short   l_pid;		 
        short   l_xxx;		 
};


# 9 "/usr/include/sys/file.h"



# 37 "/usr/include/sys/file.h"


 










 



 



 







 






# 84 "/usr/include/sys/file.h"



# 11 "../include/global.h"

# 1 "/usr/include/math.h"
 


extern int errno, signgam;

 

extern double fmod(), gamma();
extern int matherr();

 

extern double asinh(), acosh(), atanh();
extern double erf(), erfc();
extern double exp(), expm1(), log(), log10(), log1p(), pow();
extern double fabs(), floor(), ceil(), rint();
extern double lgamma();
extern double hypot(), cabs();
extern double copysign(), drem(), logb(), scalb();
extern int finite();
extern double j0(), j1(), jn(), y0(), y1(), yn();
extern double sin(), cos(), tan(), asin(), acos(), atan(), atan2();
extern double sinh(), cosh(), tanh();
extern double cbrt(), sqrt();
extern double modf(), ldexp(), frexp(), atof();

 
















# 55 "/usr/include/math.h"
















struct exception {
	int type;
	char *name;
	double arg1;
	double arg2;
	double retval;
};








# 12 "../include/global.h"

# 1 "/usr/include/strings.h"
 

 



char	*strcat();
char	*strncat();
int	strcmp();
int	strncmp();
char	*strcpy();
char	*strncpy();
int	strlen();
char	*index();
char	*rindex();
# 13 "../include/global.h"

# 1 "/usr/include/ctype.h"
 










extern	char	_ctype_[];
















# 14 "../include/global.h"

# 1 "../include/types.h"
# 30 "../include/types.h"

# 15 "../include/global.h"

# 1 "../include/kbase.h"



# 1 "../include/global.h"
 





# 144 "../include/global.h"


 




# 4 "../include/kbase.h"

# 1 "../include/types.h"
# 30 "../include/types.h"

# 5 "../include/kbase.h"


 
extern address malloc(), realloc();

 
extern address allocate( );

extern address reallocate( );

extern address allocate_array( );

 

extern string substring( );

 
extern boolean contains( );

 
extern int pos( );

 
extern string concat( );

 
extern string init_string();

 

extern void set_string_element( );

 

extern string *break_string( );

# 1 "../include/bounding_box.h"
 








			 
# 1 "../include/generic.h"
# 52 "../include/generic.h"

# 11 "../include/bounding_box.h"













extern bounding_box_type font_bounding_box;


extern bounding_box_type find_cartesian_letter_bounding_box();
extern bounding_box_type cartesian_to_matrix_bounding_box();

extern void init_font_bounding_box();
extern void update_font_bounding_box();
extern bounding_box_type get_font_bounding_box();



 




# 41 "../include/kbase.h"



 



extern void put_byte( );
extern void put_two( );
extern void put_four( );
extern void put_signed_four( );
extern void put_n_bytes( );

extern one_byte get_byte();
extern two_bytes get_two();
extern four_bytes get_four();
extern signed_4_bytes get_signed_four();
extern address get_n_bytes( );  
extern four_bytes get_n_byte_value( );  

extern one_byte get_previous_byte();
extern two_bytes get_previous_two();
extern four_bytes get_previous_four();

extern void match_byte( );
extern void match_previous_byte( );

extern void move_to_byte( );  

extern four_bytes cur_pos();


 

 


extern real fix_to_real( );
extern fix_word real_to_fix( );

 

extern void print_scaled( );
extern real scaled_to_real( );
extern scaled real_to_scaled( );


# 16 "../include/global.h"


 
extern int write(), read(), open(), lseek(), tell(), abs(), fprintf();
extern int fread(), fwrite(), fseek(), fclose(), rename(), _filbuf();
extern void exit(), close(), fflush(), perror();
extern void sprintf(), printf();
extern void free();
extern address malloc();
extern string strchr(), strrchr();



























 




 
			               



					 








					 







                             












typedef char allocated_string[ 80 ];



 

















typedef short side_bearings_value_type;

typedef struct side_bearings_structure{
        side_bearings_value_type left;	 
        side_bearings_value_type right;	 
        } side_bearings_type;
        

typedef unsigned char ascii_value_type;
typedef unsigned char direction_and_degree_type;
typedef unsigned short direction_and_length_type;        


typedef short segment_point_value_type;
        
typedef struct {
        segment_point_value_type x;
        segment_point_value_type y;
} segment_point_type;
        

typedef struct {
	int x;
        int y;
} change_in_type;


typedef double scale_factor_type;



 




# 10 "../gf/private_gf.h"

# 1 "../include/gf.h"
# 68 "../include/gf.h"

# 11 "../gf/private_gf.h"

# 1 "../gf/gf_opcodes.h"
 
















					 





























						 














 




# 12 "../gf/private_gf.h"

# 1 "../include/font_io.h"
 








typedef unsigned short  resolution_type;

typedef struct {
        unsigned char font_name_length;
        char * font_name;
        resolution_type font_resolution;
} file_header_type;

extern int open_input( );
extern int open_output( );

extern file_header_type read_file_header( );

extern void write_file_header( );


 



extern void write_bytes( 
);


extern boolean read_string( );
extern void write_string( );

extern byte_count_type get_byte_count();



 




# 13 "../gf/private_gf.h"



# 26 "../gf/private_gf.h"



typedef struct full_boc_structure{
	four_bytes char_code;		 
        four_bytes back_pointer;	 
        four_bytes min_col;		 
        four_bytes max_col;		 
        four_bytes min_row;		 
        four_bytes max_row;		 
} full_boc_type;

typedef struct abbreviated_boc_structure{
	one_byte char_code;		 
        one_byte col_delta;		 
        one_byte max_col;		 
        one_byte row_delta;		 
        one_byte max_row;		 
} abbreviated_boc_type;


					 

extern int current_input_file_descriptor;
extern int current_output_file_descriptor;

					 
extern boolean postamble_read;
extern gf_postamble_type private_gf_postamble;


					 
typedef struct char_postamble_info_structure{
        byte_count_type char_start;
	signed_4_bytes h_escapement;
        fix_word tfm_width;		 
	} char_postamble_info_type;
        
typedef char_postamble_info_type
			 char_postamble_info_vector_type[256 ];

extern char_postamble_info_vector_type  char_postamble_info;

extern byte_count_type byte_count_after_last_eoc, byte_count_before_post;


extern boolean get_command();
extern boolean back_up_one_byte();
extern gf_char_type init_gf_char();
boolean get_this_char_postamble_info();



 




# 8 "write_gf.c"


 

















void write_gf_preamble(file_descriptor)

  int file_descriptor;
  
  {
  allocated_string comment = "fill_outlines output.";
  
  current_output_file_descriptor = file_descriptor;
  put_gf_preamble(comment);
  }

 



# 1 "../gf/matrix.h"
 





# 1 "../include/gf.h"
# 68 "../include/gf.h"

# 7 "../gf/matrix.h"


extern void allocate_square_matrix();
extern void allocate_rectangular_matrix();
extern void change_matrix_element();

extern void clear_matrix();

extern void set_max_matrix_rows();
extern void set_max_matrix_cols();

extern matrix_type get_private_matrix();
extern void set_private_matrix();

extern color_type opposite_color();
extern void fill_backwards_from_here();

 
extern matrix_type matrix;
extern matrix_index_type max_matrix_rows, max_matrix_cols;
extern color_type unpack();
extern int bit_position_in_column();














           

 




# 43 "write_gf.c"

# 1 "rasterize.h"
 








# 1 "../include/global.h"
 





# 144 "../include/global.h"


 




# 10 "rasterize.h"


					 








					 






typedef unsigned short line_direction_type;
typedef unsigned short length_type;

typedef struct rasterized_letter_header_structure{
	ascii_value_type ascii_value;
        side_bearings_type side_bearings;
} rasterized_letter_header_type;
        
        
typedef struct rasterized_line_structure {
	segment_point_type start_point;
        line_direction_type direction;
        length_type length;
	} rasterized_line_type;
        

        
 





# 44 "write_gf.c"

# 1 "../include/bounding_box.h"
 





# 34 "../include/bounding_box.h"


 




# 45 "write_gf.c"

# 1 "../gf/map.h"
 







# 1 "../gf/matrix.h"
 





# 1 "../include/gf.h"
# 68 "../include/gf.h"

# 7 "../gf/matrix.h"


extern void allocate_square_matrix();
extern void allocate_rectangular_matrix();
extern void change_matrix_element();

extern void clear_matrix();

extern void set_max_matrix_rows();
extern void set_max_matrix_cols();

extern matrix_type get_private_matrix();
extern void set_private_matrix();

extern color_type opposite_color();
extern void fill_backwards_from_here();

 
extern matrix_type matrix;
extern matrix_index_type max_matrix_rows, max_matrix_cols;
extern color_type unpack();
extern int bit_position_in_column();














           

 




# 9 "../gf/map.h"


extern matrix_index_type  map_world_x_to_matrix();
extern matrix_index_type  map_world_y_to_matrix();



 




# 46 "write_gf.c"


 
























void write_gf_letter(file_descriptor, letter_header, cartesian_letter_bounding_box)

  int file_descriptor;
  rasterized_letter_header_type letter_header;
  bounding_box_type cartesian_letter_bounding_box;
  
  {
  gf_char_type gf_char;


  gf_char = init_gf_char();
					 
  current_output_file_descriptor = file_descriptor;
  
  gf_char.char_code = (four_bytes) letter_header.ascii_value;

					 





  gf_char.char_bb.min_col  = (four_bytes)(letter_header.side_bearings.left);

  gf_char.char_bb.max_col  = (four_bytes) 
		(map_world_x_to_matrix(
                    cartesian_letter_bounding_box,
                    cartesian_letter_bounding_box.max_col 
                                    ) + letter_header.side_bearings.left) ;
                             
                             
					 
  gf_char.char_bb.min_row  = (four_bytes) 
				   cartesian_letter_bounding_box.min_row ;

  gf_char.char_bb.max_row  = (four_bytes) 
				  cartesian_letter_bounding_box.max_row ;

  gf_char.bitmap = get_private_matrix();

  gf_char.h_escapement = (signed_4_bytes)
	(gf_char.char_bb.max_col  + letter_header.side_bearings.right) 
         *   65536  ;
  			
  gf_char.tfm_width = 0;

  put_gf_char(gf_char);
  }

 



 

















void write_gf_postamble(file_descriptor, font_resolution)

  int file_descriptor;
  resolution_type font_resolution;
  
  {
  four_bytes design_size = 0;	 

				
					 
  four_bytes h_resolution;		 
  four_bytes v_resolution;		 
  

  current_output_file_descriptor = file_descriptor;

  h_resolution = (four_bytes) 
	  (((double)font_resolution /  72.27 ) *   65536  );


  v_resolution = h_resolution;
  
  put_gf_postamble(0 , 0 , design_size, h_resolution, v_resolution);
  }