This is the mail archive of the gcc-patches@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]

Strlen expanding bugfix



Hi
This patch fixes the strlen expanding code. The bug caused probably by
breaking out the builtins.c from expr.c caused strlen to be never
expanded (and always handled as function call.)

Honza
Fri Oct  1 23:42:44 CEST 1999  Jan Hubicka  <hubicka@freesoft.cz>
	* builtins.c (expand_builtin_strlen): Fix best mode searching loop.
*** builtins.c.nos	Fri Oct  1 23:33:32 1999
--- builtins.c	Fri Oct  1 23:37:03 1999
*************** expand_builtin_strlen (exp, target, mode
*** 1318,1324 ****
  	{
  	  icode = strlen_optab->handlers[(int) insn_mode].insn_code;
  	  if (icode != CODE_FOR_nothing)
! 	    return 0;
  
  	  insn_mode = GET_MODE_WIDER_MODE (insn_mode);
  	}
--- 1318,1324 ----
  	{
  	  icode = strlen_optab->handlers[(int) insn_mode].insn_code;
  	  if (icode != CODE_FOR_nothing)
! 	    break;
  
  	  insn_mode = GET_MODE_WIDER_MODE (insn_mode);
  	}


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