the exact version of GCC is 4.1.1
the system type is sparc-sun-solaris2.8
the options given when GCC was configured/built:
  --prefix=/tmp/local/unixutil/gcc-4.1.1
  --with-local-prefix=/usr/local/myCompanyName
  ("myCompanyName" is not the exact wording)
  (also, there is a symlink /tmp/local/unixutil/gcc -> gcc-4.1.1)
the complete command line that triggers the bug:
  gcc -Wall -o foo.o -c foo.cc
the compiler output (error messages, warnings, etc.):
  stdout: nothing
  stderr:
    gcc: Internal error: Segmentation Fault (program cc1plus)
    Please submit a full bug report.
    See <URL:http://gcc.gnu.org/bugs.html> for instructions.
  foo.o: not created
the preprocessed file:
  see below; for ease of transmission, the full source is not given;
  to have it, replace the ZZZZZ by the missing 65524 values (in
  increasing order)
additional remarks:
  1) if the file is renamed foo.c (the C language is triggered instead
     of C++), the bug does not show up
  2) if the command is installed in a Makefile:
---Makefile--------------------------
all:
        /tmp/local/unixutil/gcc/bin/gcc -Wall -o foo.o -c foo.cc
-------------------------------------
     then the bug does not show up if the GNU make is used, however the bug
     still shows up if the /usr/ccs/bin/make is used


---foo.ii----------------------------
# 1 "foo.cc"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "foo.cc"
void myfunction(unsigned short localChar) {
  switch (localChar) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
ZZZZZ
    case 65530:
    case 65531:
    case 65532:
    case 65533:
    case 65534:
    case 65535:
      break;
  };
  return;
};
-------------------------------------


-- 
           Summary: More than 35000 switch cases crash cc1plus
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Denis dot Excoffier at airbus dot com
 GCC build triplet: sparc-sun-solaris2.8
  GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29087

Reply via email to