Bug 34215 - [4.2 Regression] ICE in assign_386_stack_local, at config/i386/i386.c:13481
Summary: [4.2 Regression] ICE in assign_386_stack_local, at config/i386/i386.c:13481
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.2
: P3 normal
Target Milestone: 4.2.3
Assignee: Uroš Bizjak
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2007-11-24 15:25 UTC by Martin Michlmayr
Modified: 2007-11-26 15:54 UTC (History)
3 users (show)

See Also:
Host:
Target: i386-linux-gnu
Build:
Known to work: 4.1.2 4.3.0
Known to fail:
Last reconfirmed: 2007-11-26 12:51:08


Attachments
preprocessed source (12.48 KB, application/octet-stream)
2007-11-24 15:25 UTC, Martin Michlmayr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Michlmayr 2007-11-24 15:25:05 UTC
[ Forwarded from http://bugs.debian.org/446714 ]

We're seeing the following ICE with 4.2:

(sid)1851:tbm@em64t: ~] gcc-4.2 -m32 -c -O dialign-t-prob.c
dialign-t-prob.c: In function ‘calc_score_dist’:
dialign-t-prob.c:11: warning: incompatible implicit declaration of built-in function ‘pow’
dialign-t-prob.c:13: internal compiler error: in assign_386_stack_local, at config/i386/i386.c:13481
Please submit a full bug report,
with preprocessed source if appropriate.

The same ICE happened with trunk from 20070916, but no longer happens
as of 20071020.  I've no idea if this got fixed or became latent.
Comment 1 Martin Michlmayr 2007-11-24 15:25:45 UTC
Created attachment 14630 [details]
preprocessed source

Shows the problem with gcc 4.2 and with trunk from 20070916 and earlier.
Comment 2 Martin Michlmayr 2007-11-24 15:26:59 UTC
The reduced testcase only shows the problem with 4.2:


/* Testcase by Martin Michlmayr <tbm@cyrius.com> */

void calc_score_dist (int mxdlen, long double d, long double **dist)
{
  unsigned long i, scr2;
  for (i = 1; i <= mxdlen; i++)
  {
    for (scr2 = mxdlen; scr2 <= mxdlen + 10; scr2++)
    {
    }
    dist[i][scr2] *= pow(1.0 / d, i);
  }
}
Comment 3 uros 2007-11-26 14:23:08 UTC
Subject: Bug 34215

Author: uros
Date: Mon Nov 26 14:22:59 2007
New Revision: 130439

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130439
Log:
	PR target/34215
	* config/i386/i386.md (truncdfsf2): Select SLOT_TEMP stack slot if
	virtual registers are instantiated.
	(truncxfsf2): Ditto.
	(truncxfdf2): Ditto.

testsuite/ChangeLog:

	PR target/34215
	* gcc.target/i386/pr34215.c: New test.


Added:
    branches/gcc-4_2-branch/gcc/testsuite/gcc.target/i386/pr34215.c
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/config/i386/i386.md
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog

Comment 4 Uroš Bizjak 2007-11-26 14:24:42 UTC
Fixed for 4.2 branch, latent on mainline.
Comment 5 uros 2007-11-26 15:53:05 UTC
Subject: Bug 34215

Author: uros
Date: Mon Nov 26 15:52:57 2007
New Revision: 130440

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130440
Log:
        PR target/34215
        * config/i386/i386.md (truncdfsf2): Select SLOT_TEMP stack slot if
        virtual registers are instantiated.
        (truncxf<mode>2): Ditto.
        (floatsi<mode>2): Ditto.
        (floatdisf2): Ditto.
        (floatdidf2): Ditto.

testsuite/ChangeLog:

        PR target/34215
        * gcc.target/i386/pr34215.c: New test.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr34215.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.md
    trunk/gcc/testsuite/ChangeLog

Comment 6 Uroš Bizjak 2007-11-26 15:54:35 UTC
Fixed.