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

            Bug ID: 60643
           Summary: ICE with -O1 and -g on mips (internal compiler error:
                    in dwarf2out_var_location, at dwarf2out.c:20810)
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hongxu.jia at windriver dot com

Created attachment 32440
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32440&action=edit
the config.log of mips-poky-linux-gcc

I have hit a ICE and could reduce it to the following minimal example:

1. Only the size of array assigned with 2 caused the issue:
$ cat > mipgcc-test.c << END

#include <stdio.h>

#define ARRAY_SIZE_MAX  2

int main (int argc, char **argv)
{
        char *pStrArry[ARRAY_SIZE_MAX] = {"hello"};
        int i = 0;

        while(pStrArry[i] && i<ARRAY_SIZE_MAX)
        {
                printf("%s\n", pStrArry[i]);
                i++;
        }

        return 0;
}

END

2. Only -O1 and -g on mips caused the issue:
$ mips-poky-linux-gcc -O1 -g -o mipgcc-test mipgcc-test.c
mipgcc-test.c: In function 'main':
mipgcc-test.c:18:1: internal compiler error: in dwarf2out_var_location, at
dwarf2out.c:20810
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions

Reply via email to