This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

target/10589: For Hitachi SH target, GCC craches when both -fomit-frame-pointer and -mdalign options are specified


>Number:         10589
>Category:       target
>Synopsis:       For Hitachi SH target, GCC craches when both -fomit-frame-pointer and -mdalign options are specified
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Thu May 01 21:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Mathieu Legris
>Release:        GCC 3.2
>Organization:
>Environment:
Cygwin or GNUSH 0302
>Description:
This bug happens only when both -fomit-frame-pointer and -mdalign are specified.
If only one of them is not specified, the compilation works.

Don't work:
 	sh-elf-gcc -v -save-temps -fomit-frame-pointer -ml -mdalign -c GccShBug.c
Work:
 	sh-elf-gcc -v -save-temps -fomit-frame-pointer -ml -c GccShBug.c
Work:
 	sh-elf-gcc -v -save-temps -ml -mdalign -c GccShBug.c
Work:
 	sh-elf-gcc -v -save-temps -ml -c GccShBug.c


GCC output:

$ sh-elf-gcc -v -save-temps -fomit-frame-pointer -ml -mdalign -c GccShBug.c
Reading specs from /usr/local/lib/gcc-lib/sh-elf/3.2/specs
Configured with: ../gcc-3.2/configure --target=sh-elf --prefix=/usr/local --with
out-headers --with-newlib --enable-languages=c : (reconfigured) ../gcc-3.2/confi
gure --target=sh-elf --prefix=/usr/local --without-headers --with-newlib --enabl
e-languages=c,c++
Thread model: single
gcc version 3.2
 /usr/local/lib/gcc-lib/sh-elf/3.2/cpp0.exe -lang-c -v -D__GNUC__=3 -D__GNUC_MIN
OR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D__sh__ -D__ELF__ -D__sh
__ -D__ELF__ -Acpu=sh -Amachine=sh -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D__sh1__
 -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__LITTLE_ENDIAN__ GccShBu
g.c GccShBug.i
GNU CPP version 3.2 (cpplib) (Hitachi SH)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc-lib/sh-elf/3.2/include
 /usr/local/sh-elf/sys-include
 /usr/local/sh-elf/include
End of search list.
 /usr/local/lib/gcc-lib/sh-elf/3.2/cc1.exe -fpreprocessed GccShBug.i -quiet -dum
pbase GccShBug.c -ml -mdalign -version -fomit-frame-pointer -o GccShBug.s
GNU CPP version 3.2 (cpplib) (Hitachi SH)
GNU C version 3.2 (sh-elf)
        compiled by GNU C version 2.95.3-5 (cygwin special).
GccShBug.c: In function `divCeil':
GccShBug.c:11: Internal compiler error in output_stack_adjust, at config/sh/sh.c
:4195
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>How-To-Repeat:
int divCeil(int a, int b) {
        int c;
        if (a>0) {
                if (b>0) c=a+b-1;
                else c=a;
        } else {
                if (b>0) c=a;
                else c=a+b+1;
        }
        return c/b;
}
>Fix:
Simple: don't use at the same time -fomit-frame-pointer and -mdalign.
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]