------- Comment #12 from pluto at agmk dot net 2007-08-02 13:29 ------- (In reply to comment #11) > Created an attachment (id=14004) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14004&action=view) [edit]
my gcc-4.2.1 (which is almost like FSF release) produces for attached preprocessed file reasonable code that contains interrupt routines. $ gcc -m32 -O2 -march=c3 -fno-strict-aliasing --save-temps -c i8259.i $ nm i8259.o |grep inter 00000020 t IRQ0x00_interrupt 00000030 t IRQ0x01_interrupt 00000040 t IRQ0x02_interrupt 00000050 t IRQ0x03_interrupt 00000060 t IRQ0x04_interrupt 00000070 t IRQ0x05_interrupt 00000080 t IRQ0x06_interrupt 00000090 t IRQ0x07_interrupt 000000a0 t IRQ0x08_interrupt 000000b0 t IRQ0x09_interrupt 000000c0 t IRQ0x0a_interrupt 000000d0 t IRQ0x0b_interrupt 000000e0 t IRQ0x0c_interrupt 000000f0 t IRQ0x0d_interrupt 00000100 t IRQ0x0e_interrupt 00000110 t IRQ0x0f_interrupt 00000000 t common_interrupt 00000000 D interrupt the 4.2 object from the first attachment hasn't interrupt code located in the .text section. it has only .bss entries and this is a reason of the crash-on-first-interrupt. $ nm i8259.o_gcc42 |grep inter 00000030 b IRQ0x00_interrupt 00000040 b IRQ0x01_interrupt 00000050 b IRQ0x02_interrupt 00000060 b IRQ0x03_interrupt 00000070 b IRQ0x04_interrupt 00000080 b IRQ0x05_interrupt 00000090 b IRQ0x06_interrupt 000000a0 b IRQ0x07_interrupt 000000b0 b IRQ0x08_interrupt 000000c0 b IRQ0x09_interrupt 000000d0 b IRQ0x0a_interrupt 000000e0 b IRQ0x0b_interrupt 000000f0 b IRQ0x0c_interrupt 00000100 b IRQ0x0d_interrupt 00000110 b IRQ0x0e_interrupt 00000120 b IRQ0x0f_interrupt 00000010 b common_interrupt 00000000 D interrupt btw, the 4.3 snapshot ICEs on this code ;) Program received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () #1 0x0000000000a4a85c in cpp_interpret_string (pfile=0xf5bd40, from=<value optimized out>, count=1, to=0x7fff77f942f0, wide=0 '\0') at ../../libcpp/charset.c:1334 #2 0x0000000000a4b120 in cpp_interpret_string_notranslate (pfile=0xffffffffffffffff, from=0xf5f8c3, count=7, to=0x7fff77f94270, wide=3 '\003') at ../../libcpp/charset.c:1369 #3 0x0000000000a4e408 in do_linemarker (pfile=0xf5bd40) at ../../libcpp/directives.c:924 #4 0x0000000000a4d36d in _cpp_handle_directive (pfile=0xf5bd40, indented=0) at ../../libcpp/directives.c:468 #5 0x0000000000a53963 in cpp_read_main_file (pfile=0xf5bd40, fname=<value optimized out>) at ../../libcpp/init.c:518 #6 0x00000000004616c1 in c_common_post_options (pfilename=0xf2a090) at ../../gcc/c-opts.c:1190 #7 0x0000000000689f00 in toplev_main (argc=12, argv=0x7fff77f94508) at ../../gcc/toplev.c:1693 #8 0x00000000004851b9 in main (argc=-1, argv=0xf5f8c3) at ../../gcc/main.c:35 -- pluto at agmk dot net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pluto at agmk dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32264