[Bug target/12007] Multiple inheritance float pass by value fails

dave at hiauly1 dot hia dot nrc dot ca gcc-bugzilla@gcc.gnu.org
Mon Jan 19 18:58:00 GMT 2004


------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca  2004-01-19 18:58 -------
Subject: Re:  Multiple inheritance float pass by value fails

> On the hppa-linux port, it returns 3.141590 -O0 and -O1, but
> 0.000000 at -O2.

This appears to be a problem with the call usage information.  The
problem seems similar PR optimization/12372.

When an argument doesn't have a prototype, floats are supposed to
be passed in both general and floating point registers.  However,
the call usage information only contains a USE for the floating
point register (%fr7):

(call_insn/j 20 19 21 0 0x402495d0 (parallel [
            (set (reg:SI 28 %r28)
		(call (mem:SI (symbol_ref/v:SI ("@printf")) [0 S4 A32])
		    (const_int 16 [0x10])))
	    (clobber (reg:SI 1 %r1))
	    (use (reg:SI 2 %r2))
	    (use (const_int 0 [0x0]))
	]) -1 (nil)
    (expr_list:REG_EH_REGION (const_int 0 [0x0])
	(nil))
    (expr_list (use (reg:DF 38 %fr7))
	(expr_list (use (reg:SI 26 %r26))
	    (nil))))

There should be use a DFmode use for %r23 (or equivalent) to get the
argument loads to %r23 and %r24 from being deleted.

I believe that this optimization is only applied in sibling calls.
A work-around may be to use "-fno-optimize-sibling-calls".

Dave


-- 


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



More information about the Gcc-bugs mailing list