This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/8407] [IA-64] ICE in simplify_gen_subreg, at simplify-rtx.c:2711 with very simple code


------- Additional Comments From wilson at specifixinc dot com  2003-12-01 09:22 -------
Subject: Re:  [IA-64] ICE in simplify_gen_subreg, at simplify-rtx.c:2711
 with very simple code

schwab at suse dot de wrote:
> ------- Additional Comments From schwab at suse dot de  2003-11-23 19:33 -------
> The ICE is still reproducable as of 20031123 when compiling with
> -fno-unit-at-a-time (or just remove static from the testcase).

There is a critical difference between Zdenek's and Richard's patches. 
Richard's patch puts a PUT_MODE operation after the assign_stack_local 
call, which changes the stack slot back to DImode after it is allocated. 
  Passing BLKmode to assign_stack_local forces it to use 
BIGGEST_ALIGNMENT, which is all Richard was trying to do.

Deleting the PUT_MODE line gets us Zdenek's patch, which solves the 
problem.  However, it isn't clear if this is the right solution.

An alternative would be to fix the IA-64 function_arg function to use 
the argument mode instead of DImode for a single-register HFA.  This 
seems a bit more reasonable.  The following patch is untested.
Index: config/ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.259
diff -p -r1.259 ia64.c
*** config/ia64/ia64.c	29 Oct 2003 14:23:45 -0000	1.259
--- config/ia64/ia64.c	1 Dec 2003 09:16:54 -0000
*************** ia64_function_arg (CUMULATIVE_ARGS *cum,
*** 3527,3535 ****
  		      ? 1 : GET_MODE_SIZE (gr_mode) / UNITS_PER_WORD;
  	}
  
!       /* If we ended up using just one location, just return that one loc.  */
        if (i == 1)
! 	return XEXP (loc[0], 0);
        else
  	return gen_rtx_PARALLEL (mode, gen_rtvec_v (i, loc));
      }
--- 3527,3536 ----
  		      ? 1 : GET_MODE_SIZE (gr_mode) / UNITS_PER_WORD;
  	}
  
!       /* If we ended up using just one location, just return that one loc, but
! 	 change the mode back to the argument mode.  */
        if (i == 1)
! 	return gen_rtx_REG (mode, REGNO (XEXP (loc[0], 0)));
        else
  	return gen_rtx_PARALLEL (mode, gen_rtvec_v (i, loc));
      }


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]