public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/11896] New: Internal compiler error using asm("lgdt %0\n\t"::"r" (gdtr));
@ 2003-08-12 18:43 earthpower at libero dot it
  2003-08-12 18:45 ` [Bug c/11896] " earthpower at libero dot it
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: earthpower at libero dot it @ 2003-08-12 18:43 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11896

           Summary: Internal compiler error using asm("lgdt %0\n\t"::"r"
                    (gdtr));
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: earthpower at libero dot it
                CC: gcc-bugs at gcc dot gnu dot org

gcc version 3.2.3 
 
Reported: 
- Output 
- Src file 
- File .i 
 
gcc -c -fno-builtin -o kernel.o kernel.c -save-temps 
kernel.c: In function `kernel_main': 
kernel.c:94: warning: cast from pointer to integer of different size 
kernel.c:96: Internal compiler error in emit_move_insn, at expr.c:2780 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://bugs.gentoo.org/> for instructions. 
make: *** [kernel.o] Error 1 
 
 
kernel.c (note that elimating line 96 all works fine) 
line 96: asm("lgdt %0\n\t"::"r" (gdtr)); 
 
#include "multiboot.h" 
#include "io.h" 
#include "memory.h" 
#include "console.h" 
#include "PM.h" 
 
#define GDT_DIMENSION 100 
 
/* 
 
At this moment: 
 
CS points to a code segment descriptor with base address 0 and limit 4 gig - 1 
 
DS, SS, ES, FS, and GS point to a data segment descriptor with base address 0 and 
limit 4 gig - 1 
 
So it's like we are using falt addresses and so cs:B8000 becomes B8000 
 
*/ 
 
//void kernel_main(word magic_number, struct MultibootInfo *mbi); 
 
 
void panic(char * msg) 
{ 
	print_str("PANIC "); 
	print_str(msg); 
} 
 
void print_some_info(struct multiboot_info *mbi, dword magic_number) 
{ 
	init_video_memory_text(); 
	clear_screen(); 
	print_str("************************************\n"); 
	print_str("____________RITE_OF_WOLF____________\n"); 
	print_str("************************************\n\n"); 
	if (sizeof(byte)!=1){ 
		panic("Byte have wrong size"); 
		return; 
	}; 
	if (sizeof(word)!=2){ 
		panic("Word have wrong size"); 
		return; 
	}; 
	if (sizeof(dword)!=4){ 
		panic("Double word have wrong size"); 
		return; 
	}; 
	if (sizeof(qword)!=8){ 
		panic("Quad word have wrong size"); 
		print_number(sizeof(qword)); 
		panic("Quad word have wrong size"); 
		return; 
	}; 
	if (magic_number == 0x2BADB002) { 
		print_str("* Loaded from a multiboot compliant boot loader\n"); 
	} else { 
		print_str("* Not loaded from a multiboot compliant boot loader\n"); 
		print_str("    Magic number retrieved : "); 
		print_hex(magic_number); 
		print_str("\n"); 
	}; 
	if (mbi->flags & 0x1){ 
		print_str("* Memory info provided\n"); 
		print_str("    Upper memory in KB : "); 
		print_number(mbi->mem_upper); 
		print_str("\n"); 
		print_str("    Lower memory in KB : "); 
		print_number(mbi->mem_lower); 
		print_str("\n"); 
	}; 
	if (mbi->flags &010){ 
		print_str("* Boot device info provided\n"); 
		if (mbi->boot_device & 0x10000000){ 
			print_str("    Booted from hard disk"); 
		} else { 
			print_str("    Booted from floppy"); 
		}; 
	} else { 
		print_str("* Boot device info not provided\n"); 
	}; 
} 
 
kernel_main(struct multiboot_info *mbi, word magic_number) 
{ 
	GDTR gdtr; 
	segment_descriptor gdt[3]; 
	init_video_memory_text(); 
	clear_screen(); 
	print_str("* Vecchia GDT (non valida)"); 
	setup_gdt_entry(&gdt[0], 0, 0, 0, 0); 
	setup_gdt_entry(&gdt[1], 0x00101000, 0x00600000, ACS_CODE, 0); 
	setup_gdt_entry(&gdt[2], 0x00600000, 0x01500000, ACS_DATA, 0); 
	gdtr.address = (word)&gdt; 
  gdtr.size = sizeof(gdt)-1; 
	asm("lgdt %0\n\t"::"r" (gdtr)); 
	/*__asm__ __volatile__ ( 
		"   lgdt (%0)\n\t" 
		: : "p" (gdtr) ); 
	//gdt_updateSegments(4,8); 
	//print_str("* GDT valida!");*/ 
	while (1); 
} 
 
kernel.i 
 
# 1 "kernel.c" 
# 1 "<built-in>" 
# 1 "<command line>" 
# 1 "kernel.c" 
# 1 "multiboot.h" 1 
# 16 "multiboot.h" 
# 1 "types.h" 1 
 
 
 
typedef unsigned char byte; 
typedef unsigned short int word; 
typedef unsigned int dword; 
typedef unsigned long long qword; 
# 17 "multiboot.h" 2 
 
 
typedef struct multiboot_header 
{ 
   dword magic; 
   dword flags; 
   dword checksum; 
   dword header_addr; 
   dword load_addr; 
   dword load_end_addr; 
   dword bss_end_addr; 
   dword entry_addr; 
} multiboot_header_t; 
 
 
typedef struct aout_symbol_table 
{ 
  dword tabsize; 
  dword strsize; 
  dword addr; 
  dword reserved; 
} aout_symbol_table_t; 
 
 
typedef struct elf_section_header_table 
{ 
  dword num; 
  dword size; 
  dword addr; 
  dword shndx; 
} elf_section_header_table_t; 
 
 
typedef struct multiboot_info 
{ 
  dword flags; 
  dword mem_lower; 
  dword mem_upper; 
  dword boot_device; 
  dword cmdline; 
  dword mods_count; 
  dword mods_addr; 
  union 
  { 
     aout_symbol_table_t aout_sym; 
     elf_section_header_table_t elf_sec; 
  } u; 
  dword mmap_length; 
  dword mmap_addr; 
} multiboot_info_t; 
 
 
typedef struct module 
{ 
  dword mod_start; 
  dword mod_end; 
  dword string; 
  dword reserved; 
} module_t; 
 
 
 
typedef struct memory_map 
{ 
  dword size; 
  dword base_addr_low; 
  dword base_addr_high; 
  dword length_low; 
  dword length_high; 
  dword type; 
} memory_map_t; 
# 2 "kernel.c" 2 
# 1 "io.h" 1 
 
 
 
 
 
 
 
inline byte inportb(word port); 
 
 
 
inline void outportb(word port, byte value); 
 
 
 
inline void outportw(word port, word value); 
 
inline void disable_interrupts(void); 
inline void enable_interrupts(void); 
inline void disable_NMIs(void); 
inline void enable_NMIs(void); 
# 3 "kernel.c" 2 
# 1 "memory.h" 1 
 
 
 
 
 
void memset(void * ptr, byte value, unsigned long how_many); 
void * memcpy(void * dst_ptr, const void * src_ptr, unsigned bytes_number); 
# 4 "kernel.c" 2 
# 1 "console.h" 1 
 
 
 
 
 
void init_video_memory_text(); 
inline void set_cursor(byte x, byte y); 
inline byte get_cursor_position_x(); 
inline byte get_cursor_position_y(); 
inline void move_cursor(unsigned char x_move, unsigned char y_move); 
inline word get_cursor_position(); 
void clear_screen(); 
inline void print_char(char c); 
inline void print_str(char * str); 
inline void print_number(unsigned long number); 
inline void print_hex(dword dw); 
# 5 "kernel.c" 2 
# 1 "PM.h" 1 
# 89 "PM.h" 
#pragma pack (push, 1)  
 
 
typedef struct { 
        word limit_l; 
        word base_l; 
        byte base_m; 
        byte access; 
        byte limit_h_and_attribs; 
        byte base_h; 
} segment_descriptor_struct; 
 
typedef union { 
        segment_descriptor_struct structured; 
        dword raw; 
} segment_descriptor; 
 
 
typedef struct { 
  word size; 
  dword address; 
} GDTR; 
 
#pragma pack (pop)  
 
void setup_gdt_entry(segment_descriptor *item, dword base, dword limit, 
                byte access, byte attribs); 
 
void init_gdt(); 
# 6 "kernel.c" 2 
# 24 "kernel.c" 
void panic(char * msg) 
{ 
        print_str("PANIC "); 
        print_str(msg); 
} 
 
void print_some_info(struct multiboot_info *mbi, dword magic_number) 
{ 
        init_video_memory_text(); 
        clear_screen(); 
        print_str("************************************\n"); 
        print_str("____________RITE_OF_WOLF____________\n"); 
        print_str("************************************\n\n"); 
        if (sizeof(byte)!=1){ 
                panic("Byte have wrong size"); 
                return; 
        }; 
        if (sizeof(word)!=2){ 
                panic("Word have wrong size"); 
                return; 
        }; 
        if (sizeof(dword)!=4){ 
                panic("Double word have wrong size"); 
                return; 
        }; 
        if (sizeof(qword)!=8){ 
                panic("Quad word have wrong size"); 
                print_number(sizeof(qword)); 
                panic("Quad word have wrong size"); 
                return; 
        }; 
        if (magic_number == 0x2BADB002) { 
                print_str("* Loaded from a multiboot compliant boot loader\n"); 
        } else { 
                print_str("* Not loaded from a multiboot compliant boot loader\n"); 
                print_str("    Magic number retrieved : "); 
                print_hex(magic_number); 
                print_str("\n"); 
        }; 
        if (mbi->flags & 0x1){ 
                print_str("* Memory info provided\n"); 
                print_str("    Upper memory in KB : "); 
                print_number(mbi->mem_upper); 
                print_str("\n"); 
                print_str("    Lower memory in KB : "); 
                print_number(mbi->mem_lower); 
                print_str("\n"); 
        }; 
        if (mbi->flags &010){ 
                print_str("* Boot device info provided\n"); 
                if (mbi->boot_device & 0x10000000){ 
                        print_str("    Booted from hard disk"); 
                } else { 
                        print_str("    Booted from floppy"); 
                }; 
        } else { 
                print_str("* Boot device info not provided\n"); 
        }; 
} 
 
kernel_main(struct multiboot_info *mbi, word magic_number) 
{ 
        GDTR gdtr; 
        segment_descriptor gdt[3]; 
        init_video_memory_text(); 
        clear_screen(); 
        print_str("* Vecchia GDT (non valida)"); 
        setup_gdt_entry(&gdt[0], 0, 0, 0, 0); 
        setup_gdt_entry(&gdt[1], 0x00101000, 0x00600000, (0x80 | 0x18 | 0x02), 0); 
        setup_gdt_entry(&gdt[2], 0x00600000, 0x01500000, (0x80 | 0x10 | 0x02), 0); 
        gdtr.address = (word)&gdt; 
  gdtr.size = sizeof(gdt)-1; 
        asm("lgdt %0\n\t"::"r" (gdtr)); 
 
 
 
 
 
        while (1); 
}


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c/11896] Internal compiler error using asm("lgdt %0\n\t"::"r" (gdtr));
  2003-08-12 18:43 [Bug c/11896] New: Internal compiler error using asm("lgdt %0\n\t"::"r" (gdtr)); earthpower at libero dot it
@ 2003-08-12 18:45 ` earthpower at libero dot it
  2003-08-12 20:14 ` [Bug inline-asm/11896] " falk at debian dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: earthpower at libero dot it @ 2003-08-12 18:45 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11896



------- Additional Comments From earthpower at libero dot it  2003-08-12 18:45 -------
Subject: Re:  New: Internal compiler error using asm("lgdt %0\n\t"::"r" (gdtr));

On Tuesday 12 August 2003 20:43, you wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11896
>
>            Summary: Internal compiler error using asm("lgdt %0\n\t"::"r"
>                     (gdtr));
>            Product: gcc
>            Version: 3.2.3
>             Status: UNCONFIRMED
>           Severity: normal
>           Priority: P2
>          Component: c
>         AssignedTo: unassigned at gcc dot gnu dot org
>         ReportedBy: earthpower at libero dot it
>                 CC: gcc-bugs at gcc dot gnu dot org
>
> gcc version 3.2.3
>
> Reported:
> - Output
> - Src file
> - File .i
>
> gcc -c -fno-builtin -o kernel.o kernel.c -save-temps
> kernel.c: In function `kernel_main':
> kernel.c:94: warning: cast from pointer to integer of different size
> kernel.c:96: Internal compiler error in emit_move_insn, at expr.c:2780
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://bugs.gentoo.org/> for instructions.
> make: *** [kernel.o] Error 1
>
>
> kernel.c (note that elimating line 96 all works fine)
> line 96: asm("lgdt %0\n\t"::"r" (gdtr));
>
> #include "multiboot.h"
> #include "io.h"
> #include "memory.h"
> #include "console.h"
> #include "PM.h"
>
> #define GDT_DIMENSION 100
>
> /*
>
> At this moment:
>
> CS points to a code segment descriptor with base address 0 and limit 4 gig
> - 1
>
> DS, SS, ES, FS, and GS point to a data segment descriptor with base address
> 0 and limit 4 gig - 1
>
> So it's like we are using falt addresses and so cs:B8000 becomes B8000
>
> */
>
> //void kernel_main(word magic_number, struct MultibootInfo *mbi);
>
>
> void panic(char * msg)
> {
> 	print_str("PANIC ");
> 	print_str(msg);
> }
>
> void print_some_info(struct multiboot_info *mbi, dword magic_number)
> {
> 	init_video_memory_text();
> 	clear_screen();
> 	print_str("************************************\n");
> 	print_str("____________RITE_OF_WOLF____________\n");
> 	print_str("************************************\n\n");
> 	if (sizeof(byte)!=1){
> 		panic("Byte have wrong size");
> 		return;
> 	};
> 	if (sizeof(word)!=2){
> 		panic("Word have wrong size");
> 		return;
> 	};
> 	if (sizeof(dword)!=4){
> 		panic("Double word have wrong size");
> 		return;
> 	};
> 	if (sizeof(qword)!=8){
> 		panic("Quad word have wrong size");
> 		print_number(sizeof(qword));
> 		panic("Quad word have wrong size");
> 		return;
> 	};
> 	if (magic_number == 0x2BADB002) {
> 		print_str("* Loaded from a multiboot compliant boot loader\n");
> 	} else {
> 		print_str("* Not loaded from a multiboot compliant boot loader\n");
> 		print_str("    Magic number retrieved : ");
> 		print_hex(magic_number);
> 		print_str("\n");
> 	};
> 	if (mbi->flags & 0x1){
> 		print_str("* Memory info provided\n");
> 		print_str("    Upper memory in KB : ");
> 		print_number(mbi->mem_upper);
> 		print_str("\n");
> 		print_str("    Lower memory in KB : ");
> 		print_number(mbi->mem_lower);
> 		print_str("\n");
> 	};
> 	if (mbi->flags &010){
> 		print_str("* Boot device info provided\n");
> 		if (mbi->boot_device & 0x10000000){
> 			print_str("    Booted from hard disk");
> 		} else {
> 			print_str("    Booted from floppy");
> 		};
> 	} else {
> 		print_str("* Boot device info not provided\n");
> 	};
> }
>
> kernel_main(struct multiboot_info *mbi, word magic_number)
> {
> 	GDTR gdtr;
> 	segment_descriptor gdt[3];
> 	init_video_memory_text();
> 	clear_screen();
> 	print_str("* Vecchia GDT (non valida)");
> 	setup_gdt_entry(&gdt[0], 0, 0, 0, 0);
> 	setup_gdt_entry(&gdt[1], 0x00101000, 0x00600000, ACS_CODE, 0);
> 	setup_gdt_entry(&gdt[2], 0x00600000, 0x01500000, ACS_DATA, 0);
> 	gdtr.address = (word)&gdt;
>   gdtr.size = sizeof(gdt)-1;
> 	asm("lgdt %0\n\t"::"r" (gdtr));
> 	/*__asm__ __volatile__ (
> 		"   lgdt (%0)\n\t"
>
> 		: : "p" (gdtr) );
>
> 	//gdt_updateSegments(4,8);
> 	//print_str("* GDT valida!");*/
> 	while (1);
> }
>
> kernel.i
>
> # 1 "kernel.c"
> # 1 "<built-in>"
> # 1 "<command line>"
> # 1 "kernel.c"
> # 1 "multiboot.h" 1
> # 16 "multiboot.h"
> # 1 "types.h" 1
>
>
>
> typedef unsigned char byte;
> typedef unsigned short int word;
> typedef unsigned int dword;
> typedef unsigned long long qword;
> # 17 "multiboot.h" 2
>
>
> typedef struct multiboot_header
> {
>    dword magic;
>    dword flags;
>    dword checksum;
>    dword header_addr;
>    dword load_addr;
>    dword load_end_addr;
>    dword bss_end_addr;
>    dword entry_addr;
> } multiboot_header_t;
>
>
> typedef struct aout_symbol_table
> {
>   dword tabsize;
>   dword strsize;
>   dword addr;
>   dword reserved;
> } aout_symbol_table_t;
>
>
> typedef struct elf_section_header_table
> {
>   dword num;
>   dword size;
>   dword addr;
>   dword shndx;
> } elf_section_header_table_t;
>
>
> typedef struct multiboot_info
> {
>   dword flags;
>   dword mem_lower;
>   dword mem_upper;
>   dword boot_device;
>   dword cmdline;
>   dword mods_count;
>   dword mods_addr;
>   union
>   {
>      aout_symbol_table_t aout_sym;
>      elf_section_header_table_t elf_sec;
>   } u;
>   dword mmap_length;
>   dword mmap_addr;
> } multiboot_info_t;
>
>
> typedef struct module
> {
>   dword mod_start;
>   dword mod_end;
>   dword string;
>   dword reserved;
> } module_t;
>
>
>
> typedef struct memory_map
> {
>   dword size;
>   dword base_addr_low;
>   dword base_addr_high;
>   dword length_low;
>   dword length_high;
>   dword type;
> } memory_map_t;
> # 2 "kernel.c" 2
> # 1 "io.h" 1
>
>
>
>
>
>
>
> inline byte inportb(word port);
>
>
>
> inline void outportb(word port, byte value);
>
>
>
> inline void outportw(word port, word value);
>
> inline void disable_interrupts(void);
> inline void enable_interrupts(void);
> inline void disable_NMIs(void);
> inline void enable_NMIs(void);
> # 3 "kernel.c" 2
> # 1 "memory.h" 1
>
>
>
>
>
> void memset(void * ptr, byte value, unsigned long how_many);
> void * memcpy(void * dst_ptr, const void * src_ptr, unsigned bytes_number);
> # 4 "kernel.c" 2
> # 1 "console.h" 1
>
>
>
>
>
> void init_video_memory_text();
> inline void set_cursor(byte x, byte y);
> inline byte get_cursor_position_x();
> inline byte get_cursor_position_y();
> inline void move_cursor(unsigned char x_move, unsigned char y_move);
> inline word get_cursor_position();
> void clear_screen();
> inline void print_char(char c);
> inline void print_str(char * str);
> inline void print_number(unsigned long number);
> inline void print_hex(dword dw);
> # 5 "kernel.c" 2
> # 1 "PM.h" 1
> # 89 "PM.h"
> #pragma pack (push, 1)
>
>
> typedef struct {
>         word limit_l;
>         word base_l;
>         byte base_m;
>         byte access;
>         byte limit_h_and_attribs;
>         byte base_h;
> } segment_descriptor_struct;
>
> typedef union {
>         segment_descriptor_struct structured;
>         dword raw;
> } segment_descriptor;
>
>
> typedef struct {
>   word size;
>   dword address;
> } GDTR;
>
> #pragma pack (pop)
>
> void setup_gdt_entry(segment_descriptor *item, dword base, dword limit,
>                 byte access, byte attribs);
>
> void init_gdt();
> # 6 "kernel.c" 2
> # 24 "kernel.c"
> void panic(char * msg)
> {
>         print_str("PANIC ");
>         print_str(msg);
> }
>
> void print_some_info(struct multiboot_info *mbi, dword magic_number)
> {
>         init_video_memory_text();
>         clear_screen();
>         print_str("************************************\n");
>         print_str("____________RITE_OF_WOLF____________\n");
>         print_str("************************************\n\n");
>         if (sizeof(byte)!=1){
>                 panic("Byte have wrong size");
>                 return;
>         };
>         if (sizeof(word)!=2){
>                 panic("Word have wrong size");
>                 return;
>         };
>         if (sizeof(dword)!=4){
>                 panic("Double word have wrong size");
>                 return;
>         };
>         if (sizeof(qword)!=8){
>                 panic("Quad word have wrong size");
>                 print_number(sizeof(qword));
>                 panic("Quad word have wrong size");
>                 return;
>         };
>         if (magic_number == 0x2BADB002) {
>                 print_str("* Loaded from a multiboot compliant boot
> loader\n"); } else {
>                 print_str("* Not loaded from a multiboot compliant boot
> loader\n"); print_str("    Magic number retrieved : ");
>                 print_hex(magic_number);
>                 print_str("\n");
>         };
>         if (mbi->flags & 0x1){
>                 print_str("* Memory info provided\n");
>                 print_str("    Upper memory in KB : ");
>                 print_number(mbi->mem_upper);
>                 print_str("\n");
>                 print_str("    Lower memory in KB : ");
>                 print_number(mbi->mem_lower);
>                 print_str("\n");
>         };
>         if (mbi->flags &010){
>                 print_str("* Boot device info provided\n");
>                 if (mbi->boot_device & 0x10000000){
>                         print_str("    Booted from hard disk");
>                 } else {
>                         print_str("    Booted from floppy");
>                 };
>         } else {
>                 print_str("* Boot device info not provided\n");
>         };
> }
>
> kernel_main(struct multiboot_info *mbi, word magic_number)
> {
>         GDTR gdtr;
>         segment_descriptor gdt[3];
>         init_video_memory_text();
>         clear_screen();
>         print_str("* Vecchia GDT (non valida)");
>         setup_gdt_entry(&gdt[0], 0, 0, 0, 0);
>         setup_gdt_entry(&gdt[1], 0x00101000, 0x00600000, (0x80 | 0x18 |
> 0x02), 0); setup_gdt_entry(&gdt[2], 0x00600000, 0x01500000, (0x80 | 0x10 |
> 0x02), 0); gdtr.address = (word)&gdt;
>   gdtr.size = sizeof(gdt)-1;
>         asm("lgdt %0\n\t"::"r" (gdtr));
>
>
>
>
>
>         while (1);
> }
>
>
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug inline-asm/11896] Internal compiler error using asm("lgdt %0\n\t"::"r" (gdtr));
  2003-08-12 18:43 [Bug c/11896] New: Internal compiler error using asm("lgdt %0\n\t"::"r" (gdtr)); earthpower at libero dot it
  2003-08-12 18:45 ` [Bug c/11896] " earthpower at libero dot it
@ 2003-08-12 20:14 ` falk at debian dot org
  2003-08-17  1:44 ` pinskia at gcc dot gnu dot org
  2003-08-18 19:41 ` falk at debian dot org
  3 siblings, 0 replies; 5+ messages in thread
From: falk at debian dot org @ 2003-08-12 20:14 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11896


falk at debian dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c                           |inline-asm
     Ever Confirmed|                            |1


------- Additional Comments From falk at debian dot org  2003-08-12 20:14 -------
I can confirm this with mainline 2003-08-08 on alpha-linux and with all older
gccs I have. Test case:

void f() { 
    struct {
	short size; 
	int address; 
    } gdtr;
    asm("" : : "r"(gdtr)); 
}

I'm not sure the code is valid though. While on Alpha at least, the struct
would fit into a register, and would be passed to functions in a register,
I think the "r" constraint is only for integral values.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug inline-asm/11896] Internal compiler error using asm("lgdt %0\n\t"::"r" (gdtr));
  2003-08-12 18:43 [Bug c/11896] New: Internal compiler error using asm("lgdt %0\n\t"::"r" (gdtr)); earthpower at libero dot it
  2003-08-12 18:45 ` [Bug c/11896] " earthpower at libero dot it
  2003-08-12 20:14 ` [Bug inline-asm/11896] " falk at debian dot org
@ 2003-08-17  1:44 ` pinskia at gcc dot gnu dot org
  2003-08-18 19:41 ` falk at debian dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-17  1:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11896



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-17 01:44 -------
Note on the mainline (20030816) on powerpc-apple-darwin6.6 (with checking disabled) GCC does 
not ICE.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug inline-asm/11896] Internal compiler error using asm("lgdt %0\n\t"::"r" (gdtr));
  2003-08-12 18:43 [Bug c/11896] New: Internal compiler error using asm("lgdt %0\n\t"::"r" (gdtr)); earthpower at libero dot it
                   ` (2 preceding siblings ...)
  2003-08-17  1:44 ` pinskia at gcc dot gnu dot org
@ 2003-08-18 19:41 ` falk at debian dot org
  3 siblings, 0 replies; 5+ messages in thread
From: falk at debian dot org @ 2003-08-18 19:41 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11896


falk at debian dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


------- Additional Comments From falk at debian dot org  2003-08-18 19:41 -------


*** This bug has been marked as a duplicate of 8788 ***


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-08-18 19:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-12 18:43 [Bug c/11896] New: Internal compiler error using asm("lgdt %0\n\t"::"r" (gdtr)); earthpower at libero dot it
2003-08-12 18:45 ` [Bug c/11896] " earthpower at libero dot it
2003-08-12 20:14 ` [Bug inline-asm/11896] " falk at debian dot org
2003-08-17  1:44 ` pinskia at gcc dot gnu dot org
2003-08-18 19:41 ` falk at debian 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).