Article View: gnu.g++.bug
Article #366(none)
From: bothner
Date: Tue, 22 Aug 1989 08:42
Date: Tue, 22 Aug 1989 08:42
42 lines
2198 bytes
2198 bytes
Subject: cc1plus 1.36.0- crashes for sony_news
Date: Mon, 21 Aug 89 20:50:38 -0700
From: bothner@wsl.dec.com
First, the config.g++ for entries for the Sony News are wrong.
I tried the following, which *seemed* to work:
news800|news)
configuration_file=xm-m68k.h
target_machine=tm-news.h
cpu_type=m68k
;;
news-gas | news-g)
configuration_file=xm-m68k.h
target_machine=tm-newsgas.h
cpu_type=m68k
;;
I then found that cc1plus crashes on most files in libg++.
E.g. I run the preprocessor on stream.cc to get stream.cpp, and then:
/usr/local/lib/gcc-cc1plus stream.cpp -quiet -dumpbase stream.cc -fstrength-reduce -fsave-memoized -opt -version -o stream.s
GNU C++ version 1.36.0- (68k, Motorola syntax) compiled by GNU C version 1.35.96.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
I get a Floating point exception in
layout_record (rec=(tree) 0x1c04cc) (stor-layout.c line 758)
754 if (var_size == 0)
755 TYPE_SIZE (rec)
756 = build_int (CEIL (CEIL (const_size, record_align) * record_align,
757 size_unit));
758 else
The reason is that CEIL is trying to divide by record_align, which is 0.
On entry to layout_record, record_align was set to 8 by:
605 int record_align = MAX (BITS_PER_UNIT, TYPE_ALIGN (rec));
It was then set to 0 in line 621:
618 if (CLASSTYPE_N_BASECLASSES (rec))
619 {
620 const_size = TREE_INT_CST_LOW (CLASSTYPE_SIZE (rec));
621 record_align = CLASSTYPE_ALIGN (rec);
622 }
Btw, there seem to be no fields in this class, since the
loop starting at line 624 is skipped.
--Per Bothner
bothner@wsl.dec.com ...!decwrl!bothner
Technical Details
Message-ID:
<8908220842.AC00623@decwrl.dec.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!wsl.dec.com!bothnerShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!wsl.dec.com!bothner From: bothner@wsl.dec.com Newsgroups: gnu.g++.bug Subject: (none) Message-ID: <8908220842.AC00623@decwrl.dec.com> Date: 22 Aug 89 08:42:16 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 42