From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26780 invoked by alias); 1 Nov 2010 18:36:30 -0000 Received: (qmail 26572 invoked by uid 22791); 1 Nov 2010 18:36:28 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_LG X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Nov 2010 18:36:23 +0000 From: "tnorth at fedoraproject dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/46261] New: avr-gcc: Segfaults when compiled with the -mint8 option X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tnorth at fedoraproject dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 01 Nov 2010 18:36:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-11/txt/msg00047.txt.bz2 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: unassigned@gcc.gnu.org ReportedBy: tnorth@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 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. :0:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See 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.