Bug 39648 - internal compiler error: in fold_convert, at fold-const.c:2506
Summary: internal compiler error: in fold_convert, at fold-const.c:2506
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.5.0
: P3 major
Target Milestone: 4.5.0
Assignee: Richard Biener
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-05 13:26 UTC by happyarch
Modified: 2009-04-05 19:52 UTC (History)
4 users (show)

See Also:
Host: x86_64
Target: x86_64
Build: x86_64
Known to work:
Known to fail:
Last reconfirmed: 2009-04-05 18:04:13


Attachments
xx.i reduced testcase (137 bytes, text/plain)
2009-04-05 15:29 UTC, marcus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description happyarch 2009-04-05 13:26:43 UTC
Hi, i have problem when compiling vim-7.2 in LFS64

TIA
==================================================

bash-4.0$ cc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-bootstrap --disable-multilib
Thread model: posix
gcc version 4.5.0 20090404 (experimental) (GCC)
bash-4.0$ pwd
/home/user/d/vim7.2
bash-4.0$ make
Starting make in the src directory.
If there are problems, cd to the src directory and run make there
cd src && make first
make[1]: Entering directory `/home/user/d/vim7.2/src'
gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -D_FORTIFY_SOURCE=1         -o objects/buffer.o buffer.c
buffer.c: In function :
buffer.c:3347: internal compiler error: in fold_convert, at fold-const.c:2506
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [objects/buffer.o] Error 1
make[1]: Leaving directory `/home/user/d/vim7.2/src'
make: *** [first] Error 2
bash-4.0$ vi fold-const.c +2506

 gcc_assert (TREE_CODE (orig) == VECTOR_TYPE
                  && tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (orig)));
Comment 1 marcus 2009-04-05 15:29:22 UTC
Created attachment 17590 [details]
xx.i reduced testcase

wine also fails, reduced testcase...
Comment 2 H.J. Lu 2009-04-05 16:08:37 UTC
I think this is the same as PR 39650.
Comment 3 Richard Biener 2009-04-05 18:04:13 UTC
Thanks to the reduced testcase I have a patch.  It's our usual &array vs.
&array[0] problem.
Comment 4 Laurent GUERBY 2009-04-05 19:01:46 UTC
This is likely the same issue that causes the sparc -linux bootstrap fail:

http://gcc.gnu.org/ml/gcc/2009-04/msg00164.html

This will save me a reduction :).

Note: I also see the same ICE during bootstrap on i686-mingw32.
Comment 5 Richard Biener 2009-04-05 19:50:48 UTC
Subject: Bug 39648

Author: rguenth
Date: Sun Apr  5 19:50:28 2009
New Revision: 145569

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145569
Log:
2009-04-05  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/39648
	* tree-ssa-sccvn.c (vn_reference_fold_indirect): Work around
	our &A vs. &A[0] IL deficiencies.

	* gcc.c-torture/compile/pr39648.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr39648.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-sccvn.c

Comment 6 Richard Biener 2009-04-05 19:52:33 UTC
Fixed.
Comment 7 hjl@gcc.gnu.org 2009-04-05 22:46:23 UTC
Subject: Bug 39648

Author: hjl
Date: Sun Apr  5 22:45:59 2009
New Revision: 145574

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145574
Log:
2009-04-05  H.J. Lu  <hongjiu.lu@intel.com>

	Backport from mainline:
	2009-04-05  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/39648
	* gcc.c-torture/compile/pr39648.c: New testcase.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr39648.c
      - copied unchanged from r145573, trunk/gcc/testsuite/gcc.c-torture/compile/pr39648.c
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog