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

           Summary: gcc-4.3.5 fails for target m68k
           Product: gcc
           Version: 4.3.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: diggskevi...@gmail.com


Created attachment 24043
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24043
standalone version of fixunsxfdi() from libgcc2.c

Hi,

The 4.3.5 release fails to successfully compile libgcc. In particular the
fixunsxfdi() routine fails with an internal compiler error for -O1 & -O2. The
popcountdi2() routine fails with an internal compiler error for -Os.

This was tested using an x86 -> m68k cross compiler configured as such:

#!/bin/bash

set -x

optlevel="O1"
export CFLAGS="-${optlevel} -g -fomit-frame-pointer"

#        --enable-secureplt \
#        --enable-version-specific-runtime-libs \
#        --with-gxx-include-dir=<dirname> \
#        --enable-languages=all,obj-c++ \
#        --disable-debug \
BOOT_CFLAGS="$CFLAGS" \
    CFLAGS_FOR_TARGET="$CFLAGS" \
    LIBCFLAGS="$CFLAGS" \
    LIBCXXFLAGS="${CFLAGS} -fno-implicit-templates" \
    CXXFLAGS="$CFLAGS" \
    FCFLAGS="$CFLAGS" \
    CXXFLAGS_FOR_TARGET="$CFLAGS" \
    GCJFLAGS="$CFLAGS" \
    JCFLAGS="$CFLAGS" \
    GNATLIBCFLAGS="$CFLAGS" \
    ADA_CFLAGS="$CFLAGS" \
    ADAFLAGS="$CFLAGS" \
    `dirname ${0}`/configure \
        --prefix=/opt/cross/q700/gcc-4.3.5-${optlevel}-c,c++ \
        --target=m68k-netbsdelf1.6.1 \
        --with-sysroot=/opt/cross/q700 \
        --with-build-time-tools=/opt/cross/q700/binutils-2.16.1/bin \
        --enable-languages=c,c++ \
        --enable-__cxa_atexit \
        --enable-gather-detailed-mem-stats \
        --disable-libgomp \
        --with-system-zlib \
        --with-gmp=/opt/GMP-4.3.2 \
        --with-mpfr=/opt/MPFR-2.4.2 \
        --with-gnu-ld \
        --with-gnu-as

set +x

gcc-4.2.4 seems ok.

For fixunsxfdi():

kevdig@Satellite2775XDVD:~/projects/GCC/OBJ/gcc-4.3.5-m68k/gcc$ ./xgcc -B. -S
-fverbose-asm -Q -dAr -O1 -m68040 -fomit-frame-pointer ../../../fixunsxfdi.c
 fixunsxfDI
Analyzing compilation unit
Performing interprocedural optimizations
 <visibility> <early_local_cleanups> <inline> <static-var>
<pure-const>Assembling functions:
 fixunsxfDI
../../../fixunsxfdi.c: In function ‘fixunsxfDI’:
../../../fixunsxfdi.c:21: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

For popcountdi2():

kevdig@Satellite2775XDVD:~/projects/GCC/OBJ/gcc-4.3.5-m68k/gcc$ ./xgcc -B. -S
-fverbose-asm -Q -dAr -Os -m68040 -fomit-frame-pointer ../../../popcountdi2.c
 popcountDI2
Analyzing compilation unit
Performing interprocedural optimizations
 <visibility> <early_local_cleanups> <inline> <static-var>
<pure-const>Assembling functions:
 popcountDI2
../../../popcountdi2.c: In function ‘popcountDI2’:
../../../popcountdi2.c:24: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to