From: pbaraona@ddt.eng.uc.edu (Phillip Baraona)
Subject: Internal Compiler error 164.
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sun, 13 Dec 1992 15:46:49 GMT

Hi there.  While attempting to use the g++ compiler (I don't know what version,
but I can find out), I got the following error message:

% g++ input.c
In file included from input.c:20:
data_structs.h:41: redefinition of `struct track_type'
input.c:26: Internal compiler error 164.
input.c:26: Please report this to `bug-g++@prep.ai.mit.edu'.

I don't understand.  Fortunately, I am just starting this project (it will
eventaully be a decent size project), and it's pretty easy for me to
include all the source code with this message (it's mostly just comments
right now).  Here it is:

---------------- Beginning of funct_proto.h -----------------------------
/******************************************************************************
 
  Module Name:  funct_proto.h

  Programmers:  Phillip Baraona
                Leo Rader

  Date:  12/12/92

  Description:  This module contains function prototypes for all functions
                and procedures in the channel router.  In addition, any
                include files (i.e. stdlib, stdio, etc.) that are needed
                in most modules are included in this file.

******************************************************************************/


/*****************************************************************************/
/*                            Include Files                                  */
/*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "data_structs.h"
----------------- End of funct_proto.h -----------------------------------



----------------- Beginning of data_structs.h ----------------------------
/******************************************************************************

  Module Name:  data_structs.h

  Programmers:  Phillip Baraona
                Leo Rader

  Date:  12/12/92

  Description:  This file contains all the data structures that are needed
                in the router and any constants used by the whole program.

******************************************************************************/


/*****************************************************************************/
/*                               Constants                                   */
/*****************************************************************************/
#define MAX_COLUMNS 1000   // Maximum number of columns in channel.
#define TOP_EDGE -100      // Track identifier of top edge of channel.
#define BOTTOM_EDGE -200   // Track identifier of bottom edgo of channel.
#define UNUSED -1          // Value of any area with no net running through.
#define VERTICAL_LAYER 0   // For array of integers used for nets.
#define HORIZONTAL_LAYER 1 // For array of integers used for nets.
#define NUMBER_OF_LAYERS 2 // Number of layers available for routing.
#define MAX_FILENAME_SIZE 80


/*****************************************************************************/
/*                            BOOLEAN Type                                   */
/*****************************************************************************/
typedef int BOOLEAN;
#define TRUE 1
#define FALSE 0


/*****************************************************************************/
/*                       Structure for Each Track                            */
/*****************************************************************************/
typedef struct track_node_type
{
  int track_number;
  int net [NUMBER_OF_LAYERS][MAX_COLUMNS];
  struct track_node_type *prev, *next;
} TRACK_TYPE;
--------------------- End of data_structs.h ----------------------------


--------------------- Beginning of input.c -----------------------------
/******************************************************************************

  Module Name:  input.c

  Programmers:  Phillip Baraona
                Leo Rader

  Date:  12/12/92

  Description:  This module contains the routines used to read in an input
		file.

******************************************************************************/


/*****************************************************************************/
/*                            Include Files                                  */
/*****************************************************************************/
#include "funct_proto.h"
#include "data_structs.h"


/*****************************************************************************/
/*                       Module Function Prototypes                          */
/*****************************************************************************/
static void get_parameters(char *filename, char unused_terminal_id);



/******************************************************************************

  Procedure Name:  get_parameters()

  Programmer:  Phillip Baraona

  Date:  12/12/92

  Description:  This procedure prompts the user to enter the name of the
		input file and the character used to identify unused
		terminals in the channel.

  Revision History:

  Date          Initials        Description
  ----------------------------------------------------------------------------
  12/12/92      PWB             Original Creation

******************************************************************************/
void get_parameters(char *filename, char unused_terminal_id)
{
  printf("This is a greedy channel router.  It will read in a net\n");
  printf("file of the format:\n");
  printf("\"TOP\"\n");
  printf("{int}\n");
  printf("\"BOTTOM\"\n");
  printf("{int}\n");
  printf("\nwhere the list of integers below TOP and BOTTOM show where each\n");
  printf("net is connected to the edges of the channel.\n\n");
  printf("What is the name of the input file?  ");
  scanf("%s", filename);

  printf("What character represents unused nets in this input file?  ");
  scanf("%c", &unused_terminal_id);
  printf("\n\n");
}


/******************************************************************************

  Procedure Name:  read_input_file()

  Programmer:  Phillip Baraona

  Date:  12/12/92

  Description:  This procedure reads in the input file.  It prompts the
		user for the filename, and asks him/her to enter the
		character that will be used to identify unused terminals.
		The procedure returns TRUE if the input file was read
		correctly, and FALSE otherwise.

  Revision History:

  Date          Initials        Description
  ----------------------------------------------------------------------------
  12/12/92      PWB             Original Creation

******************************************************************************/
main()
{
  char filename[MAX_FILENAME_SIZE];
  char unused_terminal_id;

  get_parameters(filename, unused_terminal_id);

  printf("%s  %c\n", filename, unused_terminal_id);
}
------------------------- End of input.c ---------------------------------



Newsgroups: gnu.g++.bug