This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/17607] New: Segfault on a gimmicky case label with -Os


On the following c code I have a hard segmentation fault.
The error only occurs with -Os. Other -O works fine.
First known fail: 2004-09-14 12:00:00 UTC.

C code:

int c, d, e;

void bar ();
int
foo () {
  int a, b = 7;
  switch (c) {
    case 30:
      while (1) {
          b = 10;
          break;
        }
    case 31:
      for (a = 0; a < b; a++) {
    case 33:
          c = 33;
        }
      for (a = 0; a < b; a++) {
          bar ();
        }
    }
  return 0;
}

Command line:
gcc -c -Os -o pr.o pr.i

Output:
gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.

-- 
           Summary: Segfault on a gimmicky case label with -Os
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: loki at inf dot u-szeged dot hu
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: arm-elf arm-linux i386-elf i686-linux m68k-elf mips-elf
                    ppc-elf


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]