Skip to contentSkip to conversation

two ICEs with current compiler

Linux-ia64 Bill Nottingham 2 participants 3 messages Jan 17, 2001 – Jan 18, 2001

lore
Share & tools
lore
#0 lore raw

gcc -DSTDC_HEADERS=1 -I. -I. -I.. -O2 -I/usr/lib/glib/include -I/usr/X11R6/include -c gdkgl.c -fPIC -DPIC -o .libs/gdkgl.lo gdkgl.c: In function `gdk_gl_pixmap_unref':
gdkgl.c:318: Internal compiler error in `clear_by_pieces', at expr.c:2335
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

gcc -O2 -c lexer.c
lexer.c: In function `initparser':
lexer.c:490: warning: implicit declaration of function strlen' lexer.c: In function MakeLink':
lexer.c:562: warning: cast to pointer from integer of different size lexer.c:566: warning: implicit declaration of function exit' lexer.c:568: warning: cast to pointer from integer of different size lexer.c:574: warning: cast to pointer from integer of different size lexer.c:579: warning: implicit declaration of function strcpy' lexer.c: In function `enter':
lexer.c:614: warning: implicit declaration of function strcmp' lexer.c: In function getstr':
lexer.c:658: warning: cast to pointer from integer of different size lexer.c:667: warning: cast to pointer from integer of different size lexer.c: In function `yylook':
lexer.c:2138: warning: cast from pointer to integer of different size lexer.c:2148: warning: cast from pointer to integer of different size lexer.c:2239: Internal compiler error in `find_auto_inc', at flow.c:5032 Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [lexer.o] Error 1

Bill

#1 lore raw
Quoted 5 lines

gcc -DSTDC_HEADERS=1 -I. -I. -I.. -O2 -I/usr/lib/glib/include -I/usr/X11R6/include -c gdkgl.c -fPIC -DPIC -o .libs/gdkgl.lo gdkgl.c: In function `gdk_gl_pixmap_unref':
gdkgl.c:318: Internal compiler error in `clear_by_pieces', at expr.c:2335
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

For the first problem, the code is passing a pointer to an incomplete type to __builtin_memset. Internally, gcc set the alignment of incomplete types to 1 bit. __builtin_memset then fails because it doesn't know how to copy anything with less then 8-bit (char) alignment.

This was fixed by changing the default alignment to the same as char.

2000-10-26 Nathan Sidwell <[email protected]>

* tree.c (make_node, case 't'): Set alignment to that of char_type_node.

Index: tree.c
=================================RCS file: /cvs/cvsfiles/devo/gcc/tree.c,v retrieving revision 1.197
diff -p -r1.197 tree.c
*** tree.c 2000/07/14 17:46:32 1.197
--- tree.c 2001/01/18 00:24:51
*************** make_node (code)
*** 1076,1082 ****

      case 't':
        TYPE_UID (t) = next_type_uid++;
!       TYPE_ALIGN (t) = 1;
        TYPE_USER_ALIGN (t) = 0;
        TYPE_MAIN_VARIANT (t) = t;
        TYPE_OBSTACK (t) = obstack;

--- 1076,1082 ----

      case 't':
        TYPE_UID (t) = next_type_uid++;
!       TYPE_ALIGN (t) = char_type_node ? TYPE_ALIGN (char_type_node) : 0;
        TYPE_USER_ALIGN (t) = 0;
        TYPE_MAIN_VARIANT (t) = t;
        TYPE_OBSTACK (t) = obstack;
#2 lore raw
In reply to Bill Nottingham
Quoted 6 lines

gcc -O2 -c lexer.c
...
lexer.c: In function `yylook':
lexer.c:2138: warning: cast from pointer to integer of different size lexer.c:2148: warning: cast from pointer to integer of different size lexer.c:2239: Internal compiler error in `find_auto_inc', at flow.c:5032

For the second problem, there was a little bit of code looking for a register when we actually had a slightly more complicated expression. The code needed to fail instead of aborting if it didn't find the register it was looking for.

Thu Aug 3 01:05:32 2000 Jeffrey A Law ([email protected])

* flow.c (find_auto_inc): Verify that we've got a REG before peeking at its regno. Fail, don't abort if we can't find the increment of the desired register.

Index: flow.c
=================================RCS file: /cvs/cvsfiles/devo/gcc/flow.c,v retrieving revision 1.234.2.7
diff -p -r1.234.2.7 flow.c
*** flow.c 2000/11/16 20:24:38 1.234.2.7
--- flow.c 2001/01/18 00:47:56
*************** find_auto_inc (pbi, x, insn)
*** 5024,5035 ****

    if (GET_CODE (y) != PLUS)
      return;

! if (REGNO (XEXP (y, 0)) = REGNO (addr))

      inc_val = XEXP (y, 1);
!   else if (REGNO (XEXP (y, 1)) = REGNO (addr))
      inc_val = XEXP (y, 0);
    else

! abort ();

if (GET_CODE (inc_val) = CONST_INT)
{
--- 5024,5035 ----

    if (GET_CODE (y) != PLUS)
      return;

! if (REG_P (XEXP (y, 0)) && REGNO (XEXP (y, 0)) = REGNO (addr))

      inc_val = XEXP (y, 1);
!   else if (REG_P (XEXP (y, 1)) && REGNO (XEXP (y, 1)) = REGNO (addr))
      inc_val = XEXP (y, 0);
    else

! return;

if (GET_CODE (inc_val) = CONST_INT)
{