Bug 38371 - Fold check error during bootstrap
Summary: Fold check error during bootstrap
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Jakub Jelinek
URL:
Keywords:
: 38224 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-02 10:26 UTC by Martin Jambor
Modified: 2008-12-06 09:01 UTC (History)
2 users (show)

See Also:
Host:
Target: x86_64-suse-linux
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-12-03 23:27:01


Attachments
Preprocessed source (9.97 KB, text/plain)
2008-12-02 10:27 UTC, Martin Jambor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Jambor 2008-12-02 10:26:28 UTC
When I try to bootstrap gcc trunk configured with 

configure --prefix=some_path --enable-checking=yes,fold --enable-languages=c,c++

I get a fold check error: original tree changed by fold when compiling
libdecnumber/bid/host-ieee32.c.

The exact compile command line leading to this error (in the
libdecnumber subdirectory of the build directory) is:

source='/home/mjambor/svn/libdecnumber/bid/host-ieee32.c' object='host-ieee32.o' libtool=no /home/mjambor/svn/obj/./prev-gcc/xgcc -B/home/mjambor/svn/obj/./prev-gcc/ -B/home/mjambor/inst/svn//x86_64-unknown-linux-gnu/bin/  -I/home/mjambor/svn/libdecnumber -I.  -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -pedantic -Wno-long-long -Werror -I/home/mjambor/svn/libdecnumber -I.  -c /home/mjambor/svn/libdecnumber/bid/host-ieee32.c

The error output is:

/home/mjambor/svn/libdecnumber/bid/host-ieee32.c: In function '__host_to_ieee_32':
/home/mjambor/svn/libdecnumber/bid/host-ieee32.c:50: internal compiler error: fold check: original tree changed by fold

I will attach preprocessed source.
Comment 1 Martin Jambor 2008-12-02 10:27:57 UTC
Created attachment 16808 [details]
Preprocessed source

Preprocessed source
Comment 2 Jakub Jelinek 2008-12-03 23:27:01 UTC
This is a bug in fold_checksum_tree, TYPE_NEXT_VARIANT on a type is allowed to change.
Comment 3 Jakub Jelinek 2008-12-04 09:34:50 UTC
Subject: Bug 38371

Author: jakub
Date: Thu Dec  4 09:33:27 2008
New Revision: 142430

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142430
Log:
	PR middle-end/38371
	* fold-const.c (fold_checksum_tree): Allow modification of
	TYPE_NEXT_VARIANT.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c

Comment 4 Jakub Jelinek 2008-12-04 09:39:18 UTC
Fixed.
Comment 5 Jakub Jelinek 2008-12-06 09:01:29 UTC
*** Bug 38224 has been marked as a duplicate of this bug. ***