public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/22599] New: Segfault with invalid asm usage
@ 2005-07-21 20:14 schodet at efrei dot fr
2005-07-21 20:33 ` [Bug target/22599] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: schodet at efrei dot fr @ 2005-07-21 20:14 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-07-22 3:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-21 20:14 [Bug c/22599] New: Segfault with invalid asm usage schodet at efrei dot fr
2005-07-21 20:33 ` [Bug target/22599] " pinskia at gcc dot gnu dot org
2005-07-21 21:06 ` [Bug target/22599] ICE " pinskia at gcc dot gnu dot org
2005-07-22 3:58 ` gnu at the-meissners dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).