www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1999/05/02/20:41:11

Sender: root AT remus DOT clara DOT net
Message-ID: <372CEF88.7AD084C7@auctionline.co.uk>
Date: Mon, 03 May 1999 01:36:24 +0100
From: Jason Saunders <jsaunders AT auctionline DOT co DOT uk>
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.2.4-4smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgcc AT delorie DOT com
Subject: Bug report
Reply-To: pgcc AT delorie DOT com

This is a multi-part message in MIME format.
--------------1CD45C7B8889202D390BC29B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

On compiling MySQL-3.22.22 with pgcc 1.1.3 I get the following error:

gcc -DDEFAULT_BASEDIR=\"/usr/local\" -DHAVE_CONFIG_H -I./../include
-I../include -I..  -O6 -mpentiumpro -march=pentiumpro   -DDBUG_OFF
-D_FILE_OFFSET_BITS=64 -c mf_iocache.c
mf_iocache.c: In function `init_io_cache':
mf_iocache.c:99: internal error--insn does not satisfy its constraints:
(insn:HI 285 334 331 (set (reg:DI 2 %ecx)
        (if_then_else:DI (geu:DI (reg:DI 0 %eax)
                (reg:DI 2 %ecx))
            (reg:DI 0 %eax)
            (reg:DI 2 %ecx))) 405 {movdicc+2} (insn_list 81 (nil))
    (expr_list:REG_DEAD (reg:DI 0 %eax)
        (nil)))
toplev.c:1438: Internal compiler error in function fatal_insn

It compiles fine under egcs-1.1.2

The preprocessed file is attached.

I'm not on the mailing list, so please send me a copy of any replies.

Thanks,
Jason
--------------1CD45C7B8889202D390BC29B
Content-Type: text/plain; charset=us-ascii;
 name="mf_iocache.i"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mf_iocache.i"

In file included from mf_iocache.c:17:
mysys_priv.h:4: global.h: No such file or directory
mysys_priv.h:5: my_sys.h: No such file or directory
mf_iocache.c:18: m_string.h: No such file or directory
# 1 "mf_iocache.c"
 


 












# 1 "mysys_priv.h" 1
 












# 17 "mf_iocache.c" 2









	 
	 

int init_io_cache(IO_CACHE *info, File file, uint cachesize,
		  enum cache_type type, my_off_t seek_offset,
		  pbool use_async_io, myf cache_myflags)
{
  uint min_cache;
  DBUG_ENTER("init_io_cache");

  info->file=file;
  if (!cachesize)
    if (! (cachesize= my_default_record_cache_size))
      DBUG_RETURN(1);				 
  min_cache=use_async_io ? IO_SIZE*4 : IO_SIZE*2;
  if (type == READ_CACHE)
  {						 
    my_off_t file_pos,end_of_file;
    file_pos=my_tell(file,MYF(0));
    end_of_file=my_seek(file,0L,MY_SEEK_END,MYF(0));
    if (end_of_file < seek_offset)
      end_of_file=seek_offset;
    VOID(my_seek(file,file_pos,MY_SEEK_SET,MYF(0)));
    if ((my_off_t) cachesize > end_of_file-seek_offset+IO_SIZE*2-1)
    {
      cachesize=(uint) (end_of_file-seek_offset)+IO_SIZE*2-1;
      use_async_io=0;				 
    }
  }

  for (;;)
  {
    cachesize=(uint) ((ulong) (cachesize + min_cache-1) &
		      (ulong) ~(min_cache-1));
    if (cachesize < min_cache)
      cachesize = min_cache;
    if ((info->buffer=
	 (byte*) my_malloc(cachesize,
			   MYF((cache_myflags & ~ MY_WME) |
			       (cachesize == min_cache ? MY_WME : 0)))) != 0)
      break;					 
    if (cachesize == min_cache)
      DBUG_RETURN(2);				 
    cachesize= (uint) ((long) cachesize*3/4);	 
  }
  info->pos_in_file=seek_offset;
  info->read_length=info->buffer_length=cachesize;
  info->seek_not_done=1;			 
  info->myflags=cache_myflags & ~(MY_NABP | MY_FNABP);
  info->rc_request_pos=info->rc_pos=info->buffer;

  if (type == READ_CACHE)
  {
    info->rc_end=info->buffer;			 
  }
  else
  {
    info->rc_end=info->buffer+info->buffer_length- (seek_offset & (IO_SIZE-1));
  }
  info->end_of_file=MY_FILEPOS_ERROR;		 
  info->type=type;
  info->error=0;
  info->read_function=_my_b_read;
# 97 "mf_iocache.c"

  DBUG_RETURN(0);
}						 


	 

# 127 "mf_iocache.c"


	 
	 

void reinit_io_cache(IO_CACHE *info, enum cache_type type, my_off_t seek_offset,
		     pbool use_async_io)
{
  DBUG_ENTER("reinit_io_cache");

# 145 "mf_iocache.c"

  info->pos_in_file=seek_offset;
  info->seek_not_done=1;			 
  info->rc_request_pos=info->rc_pos=info->buffer;
  if (type == READ_CACHE)
  {
    info->rc_end=info->buffer;			 
  }
  else
  {
    info->rc_end=info->buffer+info->buffer_length- (seek_offset & (IO_SIZE-1));
    info->end_of_file=MY_FILEPOS_ERROR;		 
  }
  info->type=type;
  info->error=0;
  info->read_function=_my_b_read;
# 170 "mf_iocache.c"

  DBUG_VOID_RETURN;
}  



	 
	 

int _my_b_read(register IO_CACHE *info, byte *Buffer, uint Count)
{
  uint length,diff_length,left_length;
  my_off_t max_length, pos_in_file;

  memcpy(Buffer,info->rc_pos,
	 (size_t) (left_length=(uint) (info->rc_end-info->rc_pos)));
  Buffer+=left_length;
  Count-=left_length;
  pos_in_file=info->pos_in_file+(uint) (info->rc_end - info->buffer);
  if (info->seek_not_done)
  {					 
    VOID(my_seek(info->file,pos_in_file,MY_SEEK_SET,MYF(0)));
    info->seek_not_done=0;
  }
  diff_length=(uint) (pos_in_file & (IO_SIZE-1));
  if (Count >= (uint) (IO_SIZE+(IO_SIZE-diff_length)))
  {					 
    uint read_length;
    if (info->end_of_file == pos_in_file)
    {					 
      info->error=(int) left_length;
      return 1;
    }
    length=(Count & (uint) ~(IO_SIZE-1))-diff_length;
    if ((read_length=my_read(info->file,Buffer,(uint) length,info->myflags))
	!= (uint) length)
    {
      info->error= read_length == (uint) -1 ? -1 :
	(int) (read_length+left_length);
      return 1;
    }
    Count-=length;
    Buffer+=length;
    pos_in_file+=length;
    left_length+=length;
    diff_length=0;
  }
  max_length=info->end_of_file - pos_in_file;
  if (max_length > info->read_length-diff_length)
    max_length=info->read_length-diff_length;
  if (!(length=(int) max_length) ||
      (length=my_read(info->file,info->buffer,(uint) max_length,info->myflags))
      < Count || length == (uint) -1)
  {					 
    if (length != (uint) -1)
      memcpy(Buffer,info->buffer,(size_t) length);
    info->error= length == (uint) -1 ? -1 : (int) (length+left_length);
    return 1;
  }
  info->rc_pos=info->buffer+Count;
  info->rc_end=info->buffer+length;
  info->pos_in_file=pos_in_file;
  memcpy(Buffer,info->buffer,(size_t) Count);
  return 0;
}


# 402 "mf_iocache.c"



 

int _my_b_get(IO_CACHE *info)
{
  char buff;
  if ((*(info)->read_function)(info,&buff,1))
    return my_b_EOF;
  return (int) (uchar) buff;
}

	 

int _my_b_write(register IO_CACHE *info, const byte *Buffer, uint Count)
{
  uint rest_length,length;

  rest_length=(uint) (info->rc_end - info->rc_pos);
  memcpy(info->rc_pos,Buffer,(size_t) rest_length);
  Buffer+=rest_length;
  Count-=rest_length;
  info->rc_pos+=rest_length;
  if (flush_io_cache(info))
    return 1;
  if (Count >= IO_SIZE)
  {					 
    length=Count & (uint) ~(IO_SIZE-1);
    if (info->seek_not_done)
    {					 
      VOID(my_seek(info->file,info->pos_in_file,MY_SEEK_SET,MYF(0)));
      info->seek_not_done=0;
    }
    if (my_write(info->file,Buffer,(uint) length,info->myflags | MY_NABP))
      return info->error= -1;
    Count-=length;
    Buffer+=length;
    info->pos_in_file+=length;
  }
  memcpy(info->rc_pos,Buffer,(size_t) Count);
  info->rc_pos+=Count;
  return 0;
}


	 

int flush_io_cache(IO_CACHE *info)
{
  uint length;
  DBUG_ENTER("flush_io_cache");

  if (info->type == WRITE_CACHE)
  {
    if (info->rc_pos != info->buffer)
    {
      length=(uint) (info->rc_pos - info->buffer);
      if (info->seek_not_done)
      {					 
	VOID(my_seek(info->file,info->pos_in_file,MY_SEEK_SET,MYF(0)));
	info->seek_not_done=0;
      }
      info->rc_pos=info->buffer;
      info->pos_in_file+=length;
      info->rc_end=(info->buffer+info->buffer_length-
		    (info->pos_in_file & (IO_SIZE-1)));
      if (my_write(info->file,info->buffer,length,info->myflags | MY_NABP))
	DBUG_RETURN((info->error= -1));
      DBUG_RETURN(0);
    }
  }







  info->seek_not_done=1;		 
  DBUG_RETURN(0);
}


int end_io_cache(IO_CACHE *info)
{
  int error=0;
  DBUG_ENTER("end_io_cache");
  if (info->buffer)
  {
    error=flush_io_cache(info);
    my_free((gptr) info->buffer,MYF(MY_WME));
    info->buffer=info->rc_pos=NullS;
  }
  DBUG_RETURN(error);
}  


--------------1CD45C7B8889202D390BC29B--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019