Bug 44993 - [4.6 regression] sparc64-linux bootstrap broken
Summary: [4.6 regression] sparc64-linux bootstrap broken
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Eric Botcazou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-19 16:14 UTC by Laurent GUERBY
Modified: 2010-07-28 07:47 UTC (History)
2 users (show)

See Also:
Host: sparc64-unknown-linux-gnu
Target: sparc64-unknown-linux-gnu
Build: sparc64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2010-07-24 21:43:50


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent GUERBY 2010-07-19 16:14:20 UTC
full 64 bit bootstrap is now failing:

r161903 ok
r161941 ko

/home/guerby/build/./gcc/xgcc -B/home/guerby/build/./gcc/ -B/n/62/guerby/install-trunk-64/sparc64-unknown-linux-gnu/bin/ -B/n/62/guerby/install-trunk-64/sparc64-unknown-linux-gnu/lib/ -isystem /n/62/guerby/instal\
l-trunk-64/sparc64-unknown-linux-gnu/include -isystem /n/62/guerby/install-trunk-64/sparc64-unknown-linux-gnu/sys-include    -c -g -O2  -fPIC  -W -Wall -gnatpg   a-cdlili.adb -o a-cdlili.o
+===========================GNAT BUG DETECTED==============================+
| 4.6.0 20100708 (experimental) [trunk revision 161941] (sparc64-unknown-linux-gnu) |
| Storage_Error stack overflow (or erroneous memory access)                |
| Error detected at s-finroo.ads:53:4                                      |

Then at r162274 there's a new earlier failure in bootstrap, probably masking the above:

Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/dwarf2out.o differs
gcc/tree-ssa.o differs
libdecnumber/decNumber.o differs
libdecnumber/decimal32.o differs
libdecnumber/decimal64.o differs
libdecnumber/decimal128.o differs
make[2]: *** [compare] Error 1
make[2]: Leaving directory `/home/guerby/build'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/home/guerby/build'
make: *** [bootstrap] Error 2

configure line:

export CC="gcc -m64"
../trunk/configure --prefix=/n/62/guerby/install-trunk-64 --disable-werror --enable-languages=c,ada --enable-__cxa_atexit --disable-nls --enable-threads=posix --with-mpfr=/opt/cfarm/mpfr-2.4.1-64 --with-gmp=/opt/cfarm/gmp-4.2.4-64 --with-mpc=/opt/cfarm/mpc-0.8-64
Comment 1 Mikael Pettersson 2010-07-19 21:04:26 UTC
The second failure is PR44970.
Comment 2 Eric Botcazou 2010-07-24 21:43:38 UTC
Investigating.
Comment 3 Eric Botcazou 2010-07-27 20:15:56 UTC
Introduced by the fix for PR middle-end/44790:

2010-07-07  Richard Guenther  <rguenther@suse.de>

        PR middle-end/44790
        * expr.c (expand_expr_real_1): Go the POINTER_PLUS_EXPR path
        for expanding the constant offset for MEM_REFs.

The problem is that:

  name = MEM[(struct exp_ch3__make_predefined_primitive_specs__B_99__stream_op_tss_names___PAD *)D.14526_1156 + 4294967296B];

is expanded into

	sethi	%hi(stream_op_tss_names.6060+4294967296), %l2
	or	%l2, %lo(stream_op_tss_names.6060+4294967296), %l2

which overflows since sethi is a 32-bit operator.

Going through POINTER_PLUS_EXPR to expand a const addresss apparently bypasses checks for valid addresses in the back-end.
Comment 4 Eric Botcazou 2010-07-28 07:44:55 UTC
Subject: Bug 44993

Author: ebotcazou
Date: Wed Jul 28 07:44:34 2010
New Revision: 162618

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162618
Log:
	PR middle-end/44790
	PR middle-end/44993
	* expr.c (expand_expr_real_1) <MEM_REF>: Revert latest change.  Make
	sure the base has address_mode before adding the offset.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/expr.c

Comment 5 Eric Botcazou 2010-07-28 07:47:11 UTC
Thanks for reporting the problem.