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]

Re: [bugs] Internal compiler error


> 
> The little program below compiled with
> 
> x86-64-gcc -c -O2
> 
> (cvs head version from last night) causes:
> 
> error.c: In function `fasel':
> error.c:8: Internal compiler error in output_206, at insn-output.c:2210
> Please submit a full bug report, with preprocessed source if appropriate.
> See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> 
> Anything less than -O2 seems to work.
> 
> Cheers,
> 	Egbert.
> 
> ___________________________________________________________________
> unsigned long planemask;
> 
> int
> fasel()
> {
>     return ((planemask & 0xFFFFFFFF) == 0xFFFFFFFF);
> }
I can't reproduce the crash, but from the testcase it seems to be clear
that the problem comes from const_int other than -1 or 0 accepted as
incdec.  With recent changes to const_ints, following patch should fix
it.  It is pretty obivous, but I will wait for approval to the mainline
as the recent breakage I've caused was high enought.

I am just about to finish the i386 testing w/o new failures.
Please let me know if the problem disappears for you.

Honza

Tue May 22 15:40:32 CEST 2001  Jan Hubicka  <jh@suse.cz>

	* i386.c (incdec_operand): Accept only 0 and -1.

Index: config/i386/i386.c
===================================================================
RCS file: /home/cvs/Repository/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.71
diff -c -3 -p -r1.71 i386.c
*** config/i386/i386.c	2001/05/21 09:37:52	1.71
--- config/i386/i386.c	2001/05/22 12:38:48
*************** incdec_operand (op, mode)
*** 2407,2423 ****
       registers, since carry flag is not set.  */
    if (TARGET_PENTIUM4 && !optimize_size)
      return 0;
!   if (op == const1_rtx || op == constm1_rtx)
!     return 1;
!   if (GET_CODE (op) != CONST_INT)
!     return 0;
!   if (mode == SImode && INTVAL (op) == (HOST_WIDE_INT) 0xffffffff)
!     return 1;
!   if (mode == HImode && INTVAL (op) == (HOST_WIDE_INT) 0xffff)
!     return 1;
!   if (mode == QImode && INTVAL (op) == (HOST_WIDE_INT) 0xff)
!     return 1;
!   return 0;
  }
  
  /* Return nonzero if OP is acceptable as operand of DImode shift
--- 2407,2413 ----
       registers, since carry flag is not set.  */
    if (TARGET_PENTIUM4 && !optimize_size)
      return 0;
!   return op == const1_rtx || op == constm1_rtx;
  }
  
  /* Return nonzero if OP is acceptable as operand of DImode shift


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