[Bug target/42868] New: 4.4.3 ICE in change_address_1 on sparc64

mikpe at it dot uu dot se gcc-bugzilla@gcc.gnu.org
Tue Jan 26 01:35:00 GMT 2010


The following test case ICEs gcc-4.4.3 on sparc64 when compiled with -fPIC -m64
and any optimization level >= -O1.

> cat cpu_stats.i
extern int end, etext, edata;

long util_print_cpu_stats(void)
{
    long vm_text, vm_init_data, vm_uninit_data, vm_sbrk_data;

    vm_text = (long) (((long) (&etext)) / 1024.0 + 0.5);
    vm_init_data = (long) (((long) (&edata) - (long) (&etext)) / 1024.0 + 0.5);
    vm_uninit_data = (long) (((long) (&end) - (long) (&edata)) / 1024.0 + 0.5);
    vm_sbrk_data = (long) (((long) sbrk(0) - (long) (&end)) / 1024.0 + 0.5);

    return vm_text + vm_init_data + vm_uninit_data + vm_sbrk_data;
}
> sparc64-unknown-linux-gcc -O3 -fPIC -m64 -c cpu_stats.i
cpu_stats.i: In function 'util_print_cpu_stats':
cpu_stats.i:13: internal compiler error: in change_address_1, at
emit-rtl.c:1954
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
> sparc64-unknown-linux-gcc -v
Using built-in specs.
Target: sparc64-unknown-linux
Configured with: /tmp/gcc-4.4.3/configure --target=sparc64-unknown-linux
--with-cpu=ultrasparc --prefix=/home/mikpe/pkgs/linux-x86_64/cross-sparc64
--with-gmp=/home/mikpe/pkgs/linux-x86_64/gmp-4.3.2
--with-mpfr=/home/mikpe/pkgs/linux-x86_64/mpfr-2.4.2 --disable-nls
--disable-shared --disable-libmudflap --disable-multilib --enable-threads=posix
--enable-checking=release --enable-languages=c
Thread model: posix
gcc version 4.4.3 (GCC)

Replacing -m64 with -m32 or dropping -fPIC eliminates the ICE.

4.3.4 and current 4.5.0 do not ICE. For 4.5.0 the ICE was cured by r149082 (the
fix for PR40416), however applying that fix to 4.4.3 does not eliminate the ICE
there.

Above I used a cross hosted on x86, but the ICE also occurs in a native sparc64
build.

The bug was first reported to Debian (#566242). I reduced the test case and did
a reghunt on trunk in the hope finding a backportable fix.


-- 
           Summary: 4.4.3 ICE in change_address_1 on sparc64
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mikpe at it dot uu dot se
GCC target triplet: sparc64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42868



More information about the Gcc-bugs mailing list