Bug 18096 - internal compiler error: in final_scan_insn, at final.c:2429
Summary: internal compiler error: in final_scan_insn, at final.c:2429
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 3.4.1
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-10-21 08:39 UTC by lu_zero
Modified: 2004-10-30 20:17 UTC (History)
1 user (show)

See Also:
Host:
Target: powerpc-*-*
Build:
Known to work:
Known to fail: 4.0.0 3.4.1 3.3 3.1
Last reconfirmed: 2004-10-21 11:54:39


Attachments
preprocessed sources (15.40 KB, text/plain)
2004-10-21 08:41 UTC, lu_zero
Details
sources (5.33 KB, text/plain)
2004-10-21 08:46 UTC, lu_zero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lu_zero 2004-10-21 08:39:13 UTC
the trigger of the issue is part of openmotif (luckly is a optional little
component, and that's why nobody found it out before, openmotif itself builds
fine and the componente failure won't even break the buildchain), 

preprocessed source and source follows

built it with 
gcc -O2 -pipe -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec
-fno-strict-aliasing -fsigned-char    -I../.. -I../../exports/include
-I../../imports/x11/include  -Dlinux -D__powerpc__ -D_POSIX_C_SOURCE=199309L   
                       -D_POSIX_SOURCE -D_XOPEN_SOURCE=500L                    
            -D_BSD_SOURCE -D_SVID_SOURCE -DNO_MESSAGE_CATALOG  -DFUNCPROTO=15
-DNARROWPROTO     -c -o mkcatdefs.o mkcatdefs.c
Comment 1 lu_zero 2004-10-21 08:41:02 UTC
Created attachment 7394 [details]
preprocessed sources
Comment 2 lu_zero 2004-10-21 08:46:51 UTC
Created attachment 7395 [details]
sources
Comment 3 Andrew Pinski 2004-10-21 11:34:00 UTC
Next time give the full error message plus the -v output.
Comment 4 Andrew Pinski 2004-10-21 11:54:35 UTC
(insn:TI 2000 4 1999 (set (reg:SI 0 0)
        (const_int -2147487920 [0xffffffff7fffef50])) 303 {*movsi_internal1} (nil)
    (nil))

Here is the reduced source:
void f(char*);voidmkcatdefs(char *fname) 
{
  char line [2147483647];
  f(line);
}

This causes a stack overflow anyways :).
Comment 5 Andrew Pinski 2004-10-21 11:57:19 UTC
#ifndef NL_TEXTMAX
#define NL_TEXTMAX 8192
#endif
#define MAXLINELEN NL_TEXTMAX

  char line [MAXLINELEN];


Someone should fix the source not to do this.
Comment 6 GCC Commits 2004-10-30 19:20:48 UTC
Subject: Bug 18096

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	sayle@gcc.gnu.org	2004-10-30 19:20:44

Modified files:
	gcc            : ChangeLog 
	gcc/config/rs6000: rs6000.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr18096-1.c 

Log message:
	PR middle-end/18096
	* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Check that
	the stack adjustment, "size", is valid for Pmode.  If the stack
	frame is too large, generate a trap insn and issue a warning.
	
	* gcc.dg/pr18096-1.c: New test case.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6105&r2=2.6106
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&r1=1.732&r2=1.733
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4523&r2=1.4524
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr18096-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 7 Andrew Pinski 2004-10-30 20:17:36 UTC
Fixed.