FAIL: gcc.c-torture/execute/950628-1.c execution, -O1
John David Anglin
dave@hiauly1.hia.nrc.ca
Thu Jan 18 17:01:00 GMT 2001
> typedef struct
> {
> char hours, day, month;
> short year;
> } T;
>
> T g (void)
> {
> T now;
>
> now.hours = 1;
> now.day = 2;
> now.month = 3;
> now.year = 4;
> return now;
> }
> (insn 22 20 23 (set (reg:HI 98)
> (const_int 4 [0x4])) 91 {*pa.md:2554} (nil)
> (expr_list:REG_EQUAL (const_int 4 [0x4])
> (nil)))
>
> (insn 23 22 24 (set (mem/s:HI (plus:SI (reg/f:SI 3 %r3)
> (const_int 12 [0xc])) 0)
> (reg:HI 98)) 91 {*pa.md:2554} (nil)
> (nil))
It appears that insn 23 is marked dead at line 4288 in flow.c:
if (rtx_equal_p (mem, r))
return 1;
The rtx's mem and r are equal. Here is the debug trace:
(gdb) bt
#0 0x1b613c in insn_dead_p (pbi=0x61, x=0x7ae8dd00, call_ok=62,
notes=0x7ae8d570) at ../../gcc/flow.c:4287
#1 0x1b53f0 in propagate_one_insn (pbi=0x4009aa78, insn=0x7ae93660)
at ../../gcc/flow.c:3767
#2 0x1b5db4 in propagate_block (bb=0x40097da8, live=0x7ae93660,
local_set=0x0, cond_local_set=0x0, flags=16) at ../../gcc/flow.c:4201
#3 0x1b472c in calculate_global_regs_live (blocks_in=0x400339a0,
blocks_out=0x0, flags=16) at ../../gcc/flow.c:3587
#4 0x1b3b4c in update_life_info (blocks=0x0, extent=UPDATE_LIFE_GLOBAL,
prop_flags=63) at ../../gcc/flow.c:3075
#5 0x1bdf30 in life_analysis (f=0x7ae933a0, file=0x0, flags=63)
at ../../gcc/flow.c:2937
#6 0xa0064 in rest_of_compilation (decl=0x7ae80820) at ../../gcc/toplev.c:3269
#7 0x57530 in c_expand_body (fndecl=0x7ae80820, nested_p=0)
at ../../gcc/c-decl.c:6705
#8 0x5711c in finish_function (nested=0) at ../../gcc/c-decl.c:6626
#9 0x3dd7c in yyparse_1 () at /usr/local/share/bison.simple:323
#10 0x45af8 in yyparse () at ../../gcc/c-lex.c:157
#11 0x9e220 in compile_file (name=0x190 <Address 0x190 out of bounds>)
at ../../gcc/toplev.c:2379
#12 0xa3b5c in main (argc=0, argv=0x40001728) at ../../gcc/toplev.c:4879
#13 0x7af1e6cc in ?? () from /usr/lib/libc.1
Richard, you looked at this code fairly recently. Got any clues?
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
More information about the Gcc-bugs
mailing list