This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Uninitialized register in gcse on VMS
- To: <gcc at gcc dot gnu dot org>
- Subject: Uninitialized register in gcse on VMS
- From: "Douglas B. Rupp" <rupp at gnat dot com>
- Date: Fri, 9 Nov 2001 09:46:59 -0800
Greetings,
I'm chasing a -O2 bug in the bootstrap on Alpha/VMS and I don't know how
to proceed. Please advise.
Doug Rupp
rupp@gnat.com
----------------------------------------------------------------------------
When compiling reload1.c with stage1/cc1 -O2
an uninitialized register (r11) gets stored into &reload_obstack
in the call to obstack_alloc in reload1.c: init_reload().
The dump files show the pseudo register 226 (which eventually becomes r11
in greg) being created in gcse:
09-addressof:
-------------
(insn 495 559 497 (set (reg:SI 212)
(mem/s:SI (plus:DI (reg/f:DI 160)
(const_int 12 [0xc])) [11 S4 A32])) 223 {*movsi_nt_vms} (nil)
(nil))
10-gcse:
--------
(insn 495 559 497 (set (reg:SI 212)
(reg:SI 226)) 223 {*movsi_nt_vms} (nil)
(expr_list:REG_EQUAL (mem/s:SI (const:DI (plus:DI (symbol_ref:DI ("reload_obstack"))
(const_int 12 [0xc]))) [11 S4 A32])
(nil)))
Pseudo 226 is nowhere initialized in 10-gcse, nor in any dump file.
Here is the call that creates 226:
----------------------------------
gcse.c: pre_delete(): 4916
/* Create a pseudo-reg to store the result of reaching
expressions into. Get the mode for the new pseudo from
the mode of the original destination pseudo. */
if (expr->reaching_reg == NULL)
expr->reaching_reg
= gen_reg_rtx (GET_MODE (SET_DEST (set)));
And the backtrace:
------------------
0 emit-rtl.c:701 gen_reg_rtx
1 gcse.c:4920 pre_delete
2 gcse.c:4999 pre_gcse
3 gcse.c:5045 one_pre_gcse_pass
4 gcse.c:826 gcse_main
5 toplev.c:3080 rest_of_compilation
....
gcc "trunk" sources from 20011030.