ICE compiling glibc on i686 with current CVS version

Jan Hubicka hubicka@atrey.karlin.mff.cuni.cz
Wed Dec 8 05:36:00 GMT 1999


> 
> Since a week or so, I get an ICE running make check in the current
> glibc development version.
> 
> I've made a smaller testcase out of it.  Compiling the file gives:
> /opt/gcc-2.96/bin/gcc tester2.i -c -O2    -o tester.o -Wall
> tester2.i: In function `test_stpcpy':
> tester2.i:34: Unrecognizable insn:
> (insn 222 220 224 (parallel[ 
>             (set (reg:SI 92)
>                 (neg:SI (symbol_ref:SI ("one"))))
>             (clobber (reg:CC 17 flags))
>         ] ) -1 (nil)
>     (expr_list:REG_UNUSED (reg:CC 17 flags)
>         (nil)))
> tester2.i:34: Internal compiler error in `extract_insn', at recog.c:2043
> Please submit a full bug report.
> See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for instructions.
> 
<snip>
> 
> Jan, is this a problem of one of your ix86 patches?
Yes, it is. I've used wrong predicate for the unary operations expanders.
Hope that the those mechanical predicates releated changes will not change
more harm in future...
Thanks for the bugreport!

I've write simple testcase for passing symbolic address to unary operator, maybe it can
be installed to testsuite:

int a;
int b()
{
  return -(int)&a;
}


Wed Dec  8 14:33:06 MET 1999  Jan Hubicka  <hubicka@freesoft.cz>
	* i386.md (neg??, abs?f, one_cmpl?i): Use nonimmediate_operand in expander.

*** i386.md.old5	Wed Dec  8 14:17:57 1999
--- i386.md	Wed Dec  8 14:31:31 1999
***************
*** 4724,4730 ****
  
  (define_expand "negdi2"
    [(parallel [(set (match_operand:DI 0 "nonimmediate_operand" "")
! 		   (neg:DI (match_operand:DI 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NEG, DImode, operands); DONE;")
--- 4724,4730 ----
  
  (define_expand "negdi2"
    [(parallel [(set (match_operand:DI 0 "nonimmediate_operand" "")
! 		   (neg:DI (match_operand:DI 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NEG, DImode, operands); DONE;")
***************
*** 4760,4766 ****
  
  (define_expand "negsi2"
    [(parallel [(set (match_operand:SI 0 "nonimmediate_operand" "")
! 		   (neg:SI (match_operand:SI 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NEG, SImode, operands); DONE;")
--- 4760,4766 ----
  
  (define_expand "negsi2"
    [(parallel [(set (match_operand:SI 0 "nonimmediate_operand" "")
! 		   (neg:SI (match_operand:SI 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NEG, SImode, operands); DONE;")
***************
*** 4795,4801 ****
  
  (define_expand "neghi2"
    [(parallel [(set (match_operand:HI 0 "nonimmediate_operand" "")
! 		   (neg:HI (match_operand:HI 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NEG, HImode, operands); DONE;")
--- 4795,4801 ----
  
  (define_expand "neghi2"
    [(parallel [(set (match_operand:HI 0 "nonimmediate_operand" "")
! 		   (neg:HI (match_operand:HI 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NEG, HImode, operands); DONE;")
***************
*** 4830,4836 ****
  
  (define_expand "negqi2"
    [(parallel [(set (match_operand:QI 0 "nonimmediate_operand" "")
! 		   (neg:QI (match_operand:QI 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NEG, QImode, operands); DONE;")
--- 4830,4836 ----
  
  (define_expand "negqi2"
    [(parallel [(set (match_operand:QI 0 "nonimmediate_operand" "")
! 		   (neg:QI (match_operand:QI 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NEG, QImode, operands); DONE;")
***************
*** 4867,4873 ****
  
  (define_expand "negsf2"
    [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "")
! 		   (neg:SF (match_operand:SF 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (NEG, SFmode, operands); DONE;")
--- 4867,4873 ----
  
  (define_expand "negsf2"
    [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "")
! 		   (neg:SF (match_operand:SF 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (NEG, SFmode, operands); DONE;")
***************
*** 4922,4928 ****
  
  (define_expand "negdf2"
    [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "")
! 		   (neg:DF (match_operand:DF 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (NEG, DFmode, operands); DONE;")
--- 4922,4928 ----
  
  (define_expand "negdf2"
    [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "")
! 		   (neg:DF (match_operand:DF 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (NEG, DFmode, operands); DONE;")
***************
*** 4958,4964 ****
  
  (define_expand "negxf2"
    [(parallel [(set (match_operand:XF 0 "nonimmediate_operand" "")
! 		   (neg:XF (match_operand:XF 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (NEG, XFmode, operands); DONE;")
--- 4958,4964 ----
  
  (define_expand "negxf2"
    [(parallel [(set (match_operand:XF 0 "nonimmediate_operand" "")
! 		   (neg:XF (match_operand:XF 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (NEG, XFmode, operands); DONE;")
***************
*** 5050,5056 ****
  
  (define_expand "abssf2"
    [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "")
! 		   (neg:SF (match_operand:SF 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (ABS, SFmode, operands); DONE;")
--- 5050,5056 ----
  
  (define_expand "abssf2"
    [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "")
! 		   (neg:SF (match_operand:SF 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (ABS, SFmode, operands); DONE;")
***************
*** 5105,5111 ****
  
  (define_expand "absdf2"
    [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "")
! 		   (neg:DF (match_operand:DF 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (ABS, DFmode, operands); DONE;")
--- 5105,5111 ----
  
  (define_expand "absdf2"
    [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "")
! 		   (neg:DF (match_operand:DF 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (ABS, DFmode, operands); DONE;")
***************
*** 5141,5147 ****
  
  (define_expand "absxf2"
    [(parallel [(set (match_operand:XF 0 "nonimmediate_operand" "")
! 		   (neg:XF (match_operand:XF 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (ABS, XFmode, operands); DONE;")
--- 5141,5147 ----
  
  (define_expand "absxf2"
    [(parallel [(set (match_operand:XF 0 "nonimmediate_operand" "")
! 		   (neg:XF (match_operand:XF 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    "TARGET_80387"
    "ix86_expand_unary_operator (ABS, XFmode, operands); DONE;")
***************
*** 5224,5230 ****
  
  (define_expand "one_cmplsi2"
    [(parallel [(set (match_operand:SI 0 "nonimmediate_operand" "")
! 		   (not:SI (match_operand:SI 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NOT, SImode, operands); DONE;")
--- 5224,5230 ----
  
  (define_expand "one_cmplsi2"
    [(parallel [(set (match_operand:SI 0 "nonimmediate_operand" "")
! 		   (not:SI (match_operand:SI 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NOT, SImode, operands); DONE;")
***************
*** 5262,5268 ****
  
  (define_expand "one_cmplhi2"
    [(parallel [(set (match_operand:HI 0 "nonimmediate_operand" "")
! 		   (not:HI (match_operand:HI 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NOT, HImode, operands); DONE;")
--- 5262,5268 ----
  
  (define_expand "one_cmplhi2"
    [(parallel [(set (match_operand:HI 0 "nonimmediate_operand" "")
! 		   (not:HI (match_operand:HI 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NOT, HImode, operands); DONE;")
***************
*** 5311,5317 ****
  ;; %%% Potential partial reg stall on alternative 1.  What to do?
  (define_expand "one_cmplqi2"
    [(parallel [(set (match_operand:QI 0 "nonimmediate_operand" "")
! 		   (not:QI (match_operand:QI 1 "general_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NOT, QImode, operands); DONE;")
--- 5311,5317 ----
  ;; %%% Potential partial reg stall on alternative 1.  What to do?
  (define_expand "one_cmplqi2"
    [(parallel [(set (match_operand:QI 0 "nonimmediate_operand" "")
! 		   (not:QI (match_operand:QI 1 "nonimmediate_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NOT, QImode, operands); DONE;")


More information about the Gcc-bugs mailing list