This happened to me when I wanted to look at assembler output source using gcc -S and for better readability choose -masm=intel option. -S only works fine. I tried to cut my source and include short example which can be quickly verified. I also checked this problem happen on mingw32 gcc ver 3.4.5 Try to compile this: gcc -S x.c -masm=intel x.c: ================================= #include <stdlib.h> #include <stdio.h> typedef struct { unsigned long offset; // 32-bit offset unsigned short selector; // 16-bit selector } __attribute__((packed)) PM_FAR_POINTER; int exec_ring0_code(unsigned long code_address, unsigned long ecx, unsigned long *eax, unsigned long *edx) { PM_FAR_POINTER callgate_ptr; asm __volatile__ ( "lcall *%5\n" : "=a"(*eax), "=d"(*edx) : "a"(*eax), "c"(ecx), "d"(*edx), "m" (callgate_ptr) : "memory" ); return(0); } ================================= result is: x.c: In function 'exec_ring0_code': x.c:19: internal compiler error: in print_operand, at config/i386/i386.c:7961 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Assembler output x.S stops at line "lcall *" when I compile it with gcc -S x.c only it compile all without error and mentioned line looks this: "lcall *-6(%ebp)"
Same error message as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18353 This works with revision 129548
(In reply to comment #1) > Same error message as > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18353 > > This works with revision 129548 Oh, sorry for that, I was searching for -masm and nothing found. Anyway well I'll wait for new DJGPP and MinGW 4.3.0 ports...
This is not a regression (as far as I know), so it won't be fixed in anything earlier than 4.3.0. GCC dies trying to figure out which of BYTE PTR, WORD PTR, etc. it should print for a structure. You may be able to work around it by passing (&callgate_ptr->offset) instead of (callgate_ptr). *** This bug has been marked as a duplicate of 18353 ***