Compiling this:

#define SIZE 2u << 31 - 2

int main() {
    char a[SIZE], b[SIZE];
}

Gives this compilation error:

bigcp.c: In function `main':
bigcp.c:7: error: unrecognizable insn:
(insn/f 34 33 35 (parallel [
            (set (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int -2147483656 [0xffffffff7ffffff8])))
            (clobber (reg:CC 17 flags))
            (clobber (mem:BLK (scratch) [0 A8]))
        ]) -1 (nil)
    (nil))
bigcp.c:7: internal compiler error: in insn_default_length, at 
insn-attrtab.c:435

Only the maximum allowed array size gives the error, and at least two objects
must be allocated on stack.

-- 
           Summary: Internal compiler error with maximum sized array
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ulfalizer at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: FreeBSD 5.4-RELEASE i386
  GCC host triplet: FreeBSD 5.4-RELEASE i386
GCC target triplet: FreeBSD 5.4-RELEASE i386


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

Reply via email to