This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/15136] New: Error while compiling mix c++ and inline-asm file.
- From: "swierczu at wpk dot p dot lodz dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Apr 2004 17:26:07 -0000
- Subject: [Bug inline-asm/15136] New: Error while compiling mix c++ and inline-asm file.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Gcc version:
i386: gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/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 --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--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.3 (Debian 20040401)
System version:
i386: uname -a
Linux lap 2.4.22 #2 sob lis 29 00:38:42 CET 2003 i686 GNU/Linux
Command line:
g++ -c segments.cc -mcpu=i386 -nostdinc -nostdlib -nostdinc++ -fno-builtin
-fno-rtti -fno-exceptions -fno-leading-underscore -fno-use-cxa-atexit -Wall
-pedantic -I /home/swierczu/programy/os/MicroKernel/include
Compiller output:
segments.cc:31: warning: `packed' attribute ignored
segments.cc: In function `void kernel::mmu::segInit()':
segments.cc:140: internal compiler error: in emit_move_insn, at expr.c:3197
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Cat segments.ii:
# 1 "segments.cc"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "segments.cc"
# 23 "segments.cc"
# 1 "/home/swierczu/programy/os/MicroKernel/include/asm/i386/segments.h" 1
# 23 "/home/swierczu/programy/os/MicroKernel/include/asm/i386/segments.h"
namespace kernel
{
namespace mmu
{
struct strucGdtDesc
{
unsigned char limit;
unsigned int address;
} __attribute__ ((packed));
void
segInit ();
}
}
# 24 "segments.cc" 2
using namespace kernel;
namespace kernel
{
namespace mmu
{
unsigned char gdt[] __attribute__ ((packed)) =
{
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
# 57 "segments.cc"
0xff,
0xff,
0x0,
0x0,
0x0,
0x9a,
0xcf,
0x0,
# 77 "segments.cc"
0xff,
0xff,
0x0,
0x0,
0x0,
0x92,
0xcf,
0x0,
# 97 "segments.cc"
0xff,
0xff,
0x0,
0x0,
0x0,
0xfd,
0xcf,
0x0,
# 117 "segments.cc"
0xff,
0xff,
0x0,
0x0,
0x0,
0xfd,
0xcf,
0x0
};
}
}
mmu::strucGdtDesc gdtDesc;
void
mmu::segInit ()
{
gdtDesc.limit = (sizeof (gdt) / sizeof(gdt[0])) - 1;
gdtDesc.address =
reinterpret_cast<unsigned int> (gdt);
asm volatile (
"lgdt %0\n\t"
"ljmp $0x8, $load_cs\n"
"load_cs:\n\t"
"movw $0x10, %%ax\n\t"
"movw %%ax, %%ds\n\t"
"movw %%ax, %%ss\n\t"
"movl $0x90000, %%esp\n"
: : "r" (gdtDesc)
);
return;
}
--
Summary: Error while compiling mix c++ and inline-asm file.
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: inline-asm
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: swierczu at wpk dot p dot lodz dot pl
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15136