Possible bug in gcc-2.95.1

Eric Doenges Eric.Doenges@lpr.e-technik.tu-muenchen.de
Mon Sep 13 09:03:00 GMT 1999


I think I've found a so far undocumented bug in gcc-2.95.1. While trying
to compile rtems-4.0.0, I got the following error:

/usr/local/bin/m68k-coff-gcc --pipe  -mcpu32 -Wall -ansi -fasm -g \
-B/install/gcc-stuff/build-rtems/efi332/lib/ -specs bsp_specs -qrtems \
-O4 -fomit-frame-pointer
-I/home/batian/doenges/animal/local/m68k-coff-rtems/include -c \
-o o-efi332/cfiospeed.o ../../../../../rtems-4.0.0/c/src/lib/libc/cfiospeed.c

{standard input}: Assembler messages:
{standard input}:72: Fatal error: Can't extend frag 98. chars

If I disable debugging information, the code compiles OK. 

I'm running gcc-2.95.1 configured for m68k-coff on a Digital Unix 4.0d
system. I use binutils version 2.9.1 (the latest version, as far as I
know).


The file in question:
/*
 *  This file contains the RTEMS implementation of the POSIX API
 *  routines cfgetispeed, cfgetospeed, cfsetispeed and cfsetospeed.
 *
 *  $Id: cfiospeed.c,v 1.2 1998/09/21 00:01:26 joel Exp $
 *
 */

#include <rtems.h>
#if defined(RTEMS_NEWLIB)

#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <termios.h>

#include "internal.h"
#include "libio.h"

speed_t
cfgetospeed(const struct termios *tp)
{
        return tp->c_cflag & CBAUD;
}

int
cfsetospeed(struct termios *tp, speed_t speed)
{
        if (speed & ~CBAUD) {
                errno = EINVAL;
                return -1;
        }
        tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed;
        return 0;
}

speed_t
cfgetispeed(const struct termios *tp)
{
        return (tp->c_cflag / (CIBAUD / CBAUD)) &  CBAUD;
}

int
cfsetispeed(struct termios *tp, speed_t speed)
{
        if (speed & ~CBAUD) {
                errno = EINVAL;
                return -1;
        }
        tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD));
        return 0;
}
#endif

-- 
________________________________________________________________________
Dipl.-Ing. Eric Doenges                         http://www.rcs.ei.tum.de
Institute for Real-Time Computer Systems (RCS)      fon +49-89-289-23590
Technische Universitaet Muenchen, D-80290 Muenchen  fax +49-89-289-23555


More information about the Gcc-bugs mailing list