From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24517 invoked by alias); 21 Jul 2005 20:13:03 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24480 invoked by uid 48); 21 Jul 2005 20:13:00 -0000 Date: Thu, 21 Jul 2005 20:14:00 -0000 From: "schodet at efrei dot fr" To: gcc-bugs@gcc.gnu.org Message-ID: <20050721201259.22599.schodet@efrei.fr> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/22599] New: Segfault with invalid asm usage X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg02631.txt.bz2 List-Id: I triggered a segfault on a i386 target with a piece of code intented to be compiled for avr target. I get a more descriptive message by modifiying the code a little bit. Here is the source, messages and versions : typedef unsigned long uint32_t; typedef unsigned char uint8_t; int main (void) { volatile uint32_t d = 0; volatile uint8_t b0 = 1, b1 = 2, b2 = 3, b3 = 4; asm ("mov %C0, %3" "\r\n" "mov %D0, %4" "\r\n" : "=d" (d) : "r" (b0), "r" (b1), "r" (b2), "r" (b3)); return 0; } /* cc -g -Wall -W -Wundef -O2 -I../../.. -I../../../common -MMD -include avrconfig.h t.c -o t t.c: In function `main': t.c:13: internal compiler error: Segmentation fault */ /* Or with a modified version : typedef unsigned long uint32_t; typedef unsigned char uint8_t; int main (void) { volatile uint32_t d = 0; volatile uint8_t b0 = 1, b1 = 2, b2 = 3, b3 = 4; asm ("mov %D0, %4" "\r\n" : "=d" (d) : "r" (b0), "r" (b1), "r" (b2), "r" (b3)); return 0; } */ /* t.c:15: internal compiler error: in print_operand, at config/i386/i386.c:7003 */ /* gcc -v Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux Thread model: posix gcc version 3.3.5 (Debian 1:3.3.5-13) */ -- Summary: Segfault with invalid asm usage Product: gcc Version: 3.3.5 Status: UNCONFIRMED Severity: minor Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: schodet at efrei dot fr CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i486-linux GCC host triplet: i486-linux GCC target triplet: i486-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22599