f951 generates a seg fault while building on hppa1.1-hp-hpux11.11. It can be reproduced by compiling the following fortran code with -O2 optimization: elemental function gfortran_specific_dim_r16 (p1, p2) real (kind=16), intent (in) :: p1, p2 real (kind=16) :: gfortran_specific_dim_r16 gfortran_specific_dim_r16 = dim (p1, p2) end function The segfault is coming from the ira_assert in ira_reuse_stack_slot at line 2966 of ira-color.c. allocno is NULL but gets dereferenced in the ALLOCNO_HARD_REGNO macro. It started failing sometime before r145385 and after r145268. During that period the compiler was not building correctly on PA so I don't yet know exactly what change broke it.
Putting in a workaround to fix another build problem allowed me to track this problem down as starting with version r145309: 2009-03-30 Vladimir Makarov <vmakarov@redhat.com> * reload.c (push_reload, find_dummy_reload): Use df_get_live_out instead of DF_LR_OUT. * ira-lives.c (process_bb_node_lives): Ditto. * ira-color.c (ira_loop_edge_freq): Use df_get_live_{out,in} instead of DF_LR_{OUT,IN}. * ira-emit.c (generate_edge_moves, add_ranges_and_copies): Ditto. * ira-build.c (create_bb_allocnos, create_loop_allocnos): Ditto.
Can you try comment #3 in PR 39607?
Steve, thanks for tracking it down. I did not reproduce the bug on x86-hppa cross compiler. Therefore finding the patch is important to me. This is not a single problem introduced by the patch. Another one is PR39607. Kenny pointed to me that IRA should use LIVE (not LR) info. I had some doubts therefore I did not commit the patch before the 4.4 branch creation. Now I see that the patch creates too many problems. So I am going to revert it.
> Can you try comment #3 in PR 39607? I tried that change but it did not fix the problem. Looks like Vladimir is going to revert the entire patch.
Subject: Bug 39631 Author: hjl Date: Fri Apr 3 22:25:32 2009 New Revision: 145522 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145522 Log: Mention PR rtl-optimization/39607 PR rtl-optimization/39631 in ChangeLog for revision 145521. Modified: trunk/gcc/ChangeLog
This is fixed in my builds. Steve, if this is still a problem, you can reopen.