Bug report, internal compiler error, egcs-2.91.66

Karl Cooper KCooper@transcept.com
Tue May 23 08:26:00 GMT 2000


The following source code produces an internal compiler error message:

int main (int argc, char *argv[])
{

  typedef volatile union
  {
    int firstint;
    int secondint;
  } testunion;

  testunion the_union;

  the_union.firstint = 1;
  the_union.secondint = 2;

  return 0;
}

I compile with "g++ legaltest.cpp"

The version is, according to "g++ -v":

gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

The error report is:

legaltest.cpp: In function `int main(int, char**)':
legaltest.cpp:13: Internal compiler error.
legaltest.cpp:13: Please submit a full bug report to
`egcs-bugs@egcs.cygnus.com'.
legaltest.cpp:13: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for
details.

The error does not occur if I split the compilation into two steps, using -E
on the first
step and -i on the second step.  That is why I did not send you preprocessed
output.

The error does not occur if I omit "volatile" or change "union" to "struct".

Karl Cooper
Sr. Software Engineer
Transcept, Inc.
955 Perimeter Road
Manchester, NH 
(603) 645-5762


More information about the Gcc-bugs mailing list