linux-2.3.3 doesn't boot when compiled with egcs-2.93.22
mark@codesourcery.com
mark@codesourcery.com
Mon May 24 01:12:00 GMT 1999
>>>>> "Martin" == Martin v Loewis <martin@mira.isdn.cs.tu-berlin.de> writes:
>> The problem is that function drivers/block/ide.c:init_hwif_data
>> is miscompiled, it gives the value 1 to the noprobe field of
>> the structure. egcs-1.1.2 gives the correct value 0.
Martin> This looks like an alias problem to me.
Martin> Anyway, I leave this to the aliasing wizards to decide.
Good spotting. The code is indeed not legal C:
typedef unsigned short ide_ioreg_t;
ide_ioreg_t io_ports[(10) ];
So, io_ports is of type `unsigned short ()[10]'. But,
__constant_memcpy attempts to access it through a pointer to an
unsigned long, as you said.
The only portable way to write memcpy is with `char*'; you can access
anything through a pointer-to-character. But, to make it fast, you
probably have to write it in assembly code.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-bugs
mailing list