This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cross question on egcs pre-1.1 testing
Ralf Corsepius wrote:
> Ralf Corsepius wrote:
>
> > joel@OARcorp.com wrote:
> >
> > > On Thu, 27 Aug 1998, Ralf Corsepius wrote:
> > >
> > > > Jeffrey A Law wrote:
> > > >
> > > > > In message <Pine.LNX.3.96.980824141127.12612m-100000@oar3remote.oarcorp.com>you write:
> > > > >
> > > > > > I am in the process now of building all the RTEMS configurations using
> > > > > > egcs-19980816 for C and C++. If they all build without problems, I
> > > > > > am thinking about doing it again and include the other languages.
> > > > > Cool.
> > > >
> > > > It will fail for the SH, while building for the SH3E:
> > >
> > > This is the only failure for any of the *-rtems configurations in
> > > egcs-19980816.
> >
> [..]
> >
> > IMO, egcs/gcc's backend for the SH contains some severe bugs. However, I've not yet been able
> > to build isolated test cases to demonstrate these bugs.
> [..]
In the meantime, I've been able to isolate one of these cases.
The code fragment below (stripped down from rtems' networking code) causes an "Internal compiler
error: program cc1 got fatal signal 11" error when being cross-compiled with -O2 or greater with
egcs-19980824 for an sh-rtems/sh-coff target on an i686-pc-linux-gnulibc1 host.
BTW: This fragment compiles with egcs-1.0.3a.
Ralf.
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu@faw.uni-ulm.de FAX: +49/731/501-999
http://www.faw.uni-ulm.de
/*
* Enabling BUG1 and BUG 2 causes a signal 11 core dump when
* cross-compiled with -O2 for an sh-rtems/sh-coff target
*
* This code is nonsense but should not cause gcc to dump core
*/
/*
* causes sig11 core dump
*/
#define BUG1 1
#define BUG2 1
/*
* No core dump
#define BUG1 0
#define BUG2 1
*/
/*
* No core dump
#define BUG1 1
#define BUG2 0
*/
/*
* No core dump
#define BUG1 0
#define BUG2 0
*/
struct m_hdr {
char * mh_data;
};
struct mbuf {
struct m_hdr m_hdr;
};
extern unsigned long iptime (void) ;
static int ip_dosourceroute = 0;
extern int
ip_dooptions(m)
struct mbuf *m;
{
register unsigned char *cp = m->m_hdr.mh_data + 1;
unsigned long ntime = 0 ;
switch (cp[0]) {
case 1 :
#if BUG1
if (!ip_dosourceroute) {
char buf[4*sizeof "123"];
}
#endif
break;
case 2 :
#if BUG2
ntime = iptime();
(void) memcpy(cp - 1 ,
&ntime,
sizeof(unsigned long));
#endif
}
return (0);
}