http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46261
Summary: avr-gcc: Segfaults when compiled with the -mint8 option Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: tno...@fedoraproject.org The compiler segfaults when code is compiled with -mint8 option. This bug was previously reported here: https://bugzilla.redhat.com/show_bug.cgi?id=626889 Arch: reported to happend on i686 and x86_64. GCC build: see below. How to reproduce: compile and run the following code, as shown below. /** \file testmint8.c */ #include <avr/io.h> int main(void) { DDRB=0xFF; while(1) { PORTB++; } } Output: avr-gcc -v -Wall -g2 -gstabs -O0 -fpack-struct -fshort-enums -std=gnu99 -funsigned-char -funsigned-bitfields -mint8 -mmcu=at90pwm3b -DF_CPU=8000000UL -MMD -MP -MF"testmint8.d" -MT"testmint8.d" -c -o"testmint8.o" "testmint8.c" -save-temps Using built-in specs. COLLECT_GCC=/usr/bin/avr-gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/avr/4.5.1/lto-wrapper Target: avr Configured with: ../gcc-4.5.1/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-system-zlib --enable-version-specific-runtime-libs --with-pkgversion='Fedora 4.5.1-2.fc14' --with-bugurl=https://bugzilla.redhat.com/ Thread model: single gcc version 4.5.1 (Fedora 4.5.1-2.fc14) COLLECT_GCC_OPTIONS='-v' '-Wall' '-g2' '-gstabs' '-O0' '-fpack-struct' '-fshort-enums' '-std=gnu99' '-funsigned-char' '-funsigned-bitfields' '-mint8' '-mmcu=at90pwm3b' '-DF_CPU=8000000UL' '-MMD' '-MP' '-MFtestmint8.d' '-MTtestmint8.d' '-c' '-o' 'testmint8.o' '-save-temps' /usr/libexec/gcc/avr/4.5.1/cc1 -E -quiet -v -imultilib avr4 -MMD testmint8.d -MFtestmint8.d -MP -MTtestmint8.d -MQ testmint8.o -DF_CPU=8000000UL testmint8.c -mint8 -mmcu=at90pwm3b -std=gnu99 -Wall -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -g2 -gstabs -fworking-directory -O0 -fpch-preprocess -o testmint8.i ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.1/../../../../avr/sys-include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/avr/4.5.1/include /usr/lib/gcc/avr/4.5.1/include-fixed /usr/lib/gcc/avr/4.5.1/../../../../avr/include End of search list. <built-in>:0:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <https://bugzilla.redhat.com/> for instructions. preprocessed file (*.i*) is short and contains: # 1 "testmint8.c" # 1 "/tmp//" avr-gcc --version -v Using built-in specs. COLLECT_GCC=/usr/bin/avr-gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/avr/4.5.1/lto-wrapper avr-gcc (Fedora 4.5.1-2.fc14) 4.5.1 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Target: avr Configured with: ../gcc-4.5.1/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-system-zlib --enable-version-specific-runtime-libs --with-pkgversion='Fedora 4.5.1-2.fc14' --with-bugurl=https://bugzilla.redhat.com/ Thread model: single gcc version 4.5.1 (Fedora 4.5.1-2.fc14) COLLECT_GCC_OPTIONS='-fversion' '-v' /usr/libexec/gcc/avr/4.5.1/cc1 -quiet -v help-dummy -quiet -dumpbase help-dummy -auxbase help-dummy -version -fversion -o /tmp/ccfBxPus.s GNU C (Fedora 4.5.1-2.fc14) version 4.5.1 (avr) compiled by GNU C version 4.5.1 20100907 (Red Hat 4.5.1-3), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 COLLECT_GCC_OPTIONS='-fversion' '-v' /usr/lib/gcc/avr/4.5.1/../../../../avr/bin/as --version -o /tmp/cc9BaGQj.o /tmp/ccfBxPus.s GNU assembler (GNU Binutils) 2.20 Copyright 2009 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or later. This program has absolutely no warranty. This assembler was configured for a target of `avr'. COMPILER_PATH=/usr/libexec/gcc/avr/4.5.1/:/usr/libexec/gcc/avr/4.5.1/:/usr/libexec/gcc/avr/:/usr/lib/gcc/avr/4.5.1/:/usr/lib/gcc/avr/:/usr/lib/gcc/avr/4.5.1/../../../../avr/bin/ LIBRARY_PATH=/usr/lib/gcc/avr/4.5.1/:/usr/lib/gcc/avr/4.5.1/../../../../avr/lib/ COLLECT_GCC_OPTIONS='-fversion' '-v' /usr/libexec/gcc/avr/4.5.1/collect2 --version -L/usr/lib/gcc/avr/4.5.1 -L/usr/lib/gcc/avr/4.5.1/../../../../avr/lib /tmp/cc9BaGQj.o -lgcc -lc -lgcc GNU ld (GNU Binutils) 2.20 Copyright 2009 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty.