This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30483] New: Internal compiler error with inline volatile assembly on AVR
- From: "richard at vems dot co dot nz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jan 2007 11:18:21 -0000
- Subject: [Bug c/30483] New: Internal compiler error with inline volatile assembly on AVR
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I was reworking an existing AVR application for C89 compatibility, and while
doing so, found an internal compiler error while dealing with inline assembly.
I have taken the offending function and trimmed the code to a minimum for a
test.
Output is as follows:
test.c: In function 'spi_manual_send_ass_GCC_BUGGY':
test.c:22: internal compiler error: in ptrreg_to_str, at config/avr/avr.c:1009
Please submit a full bug report,
with preprocessed source if appropriate.
The preprocessed source of test.i is appended:
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "test.c"
typedef unsigned char uint8_t;
__inline__ uint8_t spi_manual_send_ass_GCC_BUGGY( uint8_t dat )
{
uint8_t pb;
__asm__ volatile (
"\n"
"nop \n\t"
"ori %a1,8 \n\t"
"out 0x05,%a1 \n\t"
: "=&d" (dat)
: "d" (pb)
);
return pb;
}
int main() {
uint8_t dat = 0;
uint8_t result = 0;
result = spi_manual_send_ass_GCC_BUGGY(dat);
return 0;
}
--
Summary: Internal compiler error with inline volatile assembly on
AVR
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: richard at vems dot co dot nz
GCC build triplet: i586-suse-linux
GCC host triplet: i586-suse-linux
GCC target triplet: avr-unknown-unknown
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30483