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.
Confirmed. We should be producing a warning/error message for this like we do on PowerPC. t.c: In function 'main': t.c:5: warning: stack frame too large
This has been fixed now with: 2005-11-09 Eric Botcazou <ebotcazou@adacore.com> * function.c (assign_stack_local_1): Issue an error message if the frame size overflows in the signed target arithmetics.
Subject: Bug 22539 Author: dfranke Date: Fri May 4 18:02:18 2007 New Revision: 124437 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124437 Log: gcc/fortran: 2007-05-04 Daniel Franke <franke.daniel@gmail.com> PR fortran/22539 * intrinsic.c (add_subroutines): Added FSEEK. * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New. * iresolve.c (gfc_resolve_fseek_sub): New. * check.c (gfc_check_fseek_sub): New. * intrinsic.texi (FSEEK): Updated. gcc/testsuite: 2007-05-01 Daniel Franke <franke.daniel@gmail.com> PR fortran/22539 * gfortran.dg/fseek.f90: New test. libgfortran: 2007-05-04 Daniel Franke <franke.daniel@gmail.com> PR fortran/22539 * io/intrinsics.c (fseek_sub): New. * io/unix.c (fd_fseek): Change logical and physical offsets only if seek succeeds. * gfortran.map (fseek_sub): New. Added: trunk/gcc/testsuite/gfortran.dg/fseek.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/check.c trunk/gcc/fortran/intrinsic.c trunk/gcc/fortran/intrinsic.h trunk/gcc/fortran/intrinsic.texi trunk/gcc/fortran/iresolve.c trunk/gcc/testsuite/ChangeLog trunk/libgfortran/ChangeLog trunk/libgfortran/gfortran.map trunk/libgfortran/io/intrinsics.c trunk/libgfortran/io/unix.c