From: Manfred Hollstein <manfred@s-direktnet.de>
To: gcc2@cygnus.com
Cc: law@cygnus.com, rms@gnu.org, Manfred.Hollstein@ks.sel.alcatel.de,
oliva@dcc.unicamp.br, egcs@cygnus.com
Subject: Re: New problems with gcc-2.8.0 based code - NOW FIXED!
Date: Thu, 01 Jan 1998 10:02:00 -0000 [thread overview]
Message-ID: <199801011710.SAA00706@saturn.s-direktnet.de> (raw)
In-Reply-To: <k2lnx2u3dr.fsf@zero.aec.at>
On , 30 December 1997, 18:50:24, ak@muc.de wrote:
> I remember a bugfix between egcs 1.0 and 1.0.1 so that it treats
> __asm__ statements without output operands always as volatile. The Linux
> kernel depends on this behaviour. If gcc 2.8.0 doesn't have this bugfix
> it could be the cause for your problems.
>
After the discussion about __volatile__ __asm__ statements I just
added Jeffrey Law's patch to gcc-2.8.0-971225:
Mon Dec 15 08:48:24 1997 Jeffrey A Law (law@cygnus.com)
* stmt.c (expand_asm_operands): If an ASM has no outputs, then treat
it as volatile.
diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-2.8.0.orig/gcc/stmt.c gcc-2.8.0/gcc/stmt.c
*** gcc-2.8.0.orig/gcc/stmt.c Tue Dec 9 01:07:38 1997
--- gcc-2.8.0/gcc/stmt.c Wed Dec 31 23:42:54 1997
*************** expand_asm_operands (string, outputs, in
*** 1421,1426 ****
--- 1421,1430 ----
/* The insn we have emitted. */
rtx insn;
+ /* An ASM with no outputs needs to be treated as volatile. */
+ if (noutputs == 0)
+ vol = 1;
+
if (output_bytecode)
{
error ("`asm' is invalid when generating bytecode");
rebuilt and installed the compiler. I then used this compiler to built
linux-2.1.76 once again and I'm still getting the same boot failures
(16 times the _same_ Oops's from boot to reboot):
Unable to handle kernel NULL pointer dereference at virtual address 00000018
current->tss.cr3 = 00101000, ^_r3 = 00101000
*pde = 00000000
Oops: 0000
CPU: 0
EIP: 0010:[<kfree+12b/1cd>]
EFLAGS: 00010002
eax: 00000100 ebx: c02f52c0 ecx: 00000000 edx: c0221000
esi: c3e79800 edi: 00000202 ebp: c3e79800 esp: c3e25f88
ds: 0018 es: 0018 ss: 0018
Process modutils (pid: 25, process nr: 8, stackpage=c3e25000)
Stack: c3e24000 c3e887c0 00000400 00000021 c011b96d c009cda0 c011b99d c3e79800
c3e24000 ffffffff fffffffc 00000000 c011c14c 00000000 c0109f1a 00000000
00000000 400d2c44 ffffffff fffffffc 00000000 00000001 0000002b 0000002b
Call Trace: [<do_exit+1f7/29b>] [<do_exit+227/29b>] [<sys_waitpid>] [<system_call+3a/40>]
Code: c01275d9 <kfree+12b/1cd> 2b 69 18 subl 0x18(%ecx),%ebp
Code: c01275dc <kfree+12e/1cd> 89 e8 movl %ebp,%eax
Code: c01275de <kfree+130/1cd> 31 d2 xorl %edx,%edx
Code: c01275e0 <kfree+132/1cd> f7 73 08 divl 0x8(%ebx),%eax
Code: c01275e9 <kfree+13b/1cd> 8b 51 04 movl 0x4(%ecx),%edx
Code: c01275ec <kfree+13e/1cd> 8d 14 82 leal (%edx,%eax,4),%edx
Code: c01275ef <kfree+141/1cd> 89 54 24 10 movl %edx,0x10(%esp,1)
Another problem has been shown by several test programs from
libg++-2.8.0b6.5. As an example, try to compile the following
snippet:
/* File: t002.cc
* Compiled by gcc-2.8.0-971225 using
* optimization
* _and_ -funroll-all-loops
* _and_ -g
* results in an `Internal compiler error'. */
#include <String.h>
#include <Regex.h>
#include <iostream.h>
int main (void)
{
String z = "This string\thas\nfive words";
String w[10];
int nw = split (z, w, 10, RXwhite);
for (int i = 0; i < nw; ++i)
{
cout << "z[" << i << "] = \"" << w[i] << "\"" << endl;
}
return 0;
}
$ gcc -v
Reading specs from /tools/gnu/lib/gcc-lib/i586-linux-gnulibc1/2.8.0/specs
gcc version 2.8.0
$ uname -a
Linux saturn 2.0.33 #7 Mon Dec 29 13:09:29 MET 1997 i586 unknown
$ gcc -O -funroll-all-loops -g -S t002.cc
t002.cc: In function `int main()':
t002.cc:17: Internal compiler error.
t002.cc:17: Please submit a full bug report to `bug-g++@prep.ai.mit.edu'.
Omitting either `-funroll-all-loops' or `-g' works, though.
If you need the expanded .ii file send me an e-mail.
And you guys from the gcc2 mailing list, please add my e-mail address
to the To: or Cc: fields explicitly, as I still couldn't get onto the
mailing list :-(
Manfred
next prev parent reply other threads:[~1998-01-01 10:02 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-12-10 12:02 cannot bootstrap neither gcc-2.8.0-971206 nor egcs-971207 on sparc-sun-sunos4.1.3 Alexandre Oliva
1997-12-10 23:09 ` Manfred.Hollstein
1997-12-11 3:32 ` Paul Eggert
1997-12-11 1:51 ` Manfred.Hollstein
1997-12-22 12:06 ` Jeffrey A Law
1997-12-22 22:04 ` Alexandre Oliva
1997-12-26 8:11 ` New problems with gcc-2.8.0 based code [was: Re: cannot bootstrap neither gcc-2.8.0-971206 nor egcs-971207 on sparc-sun-sunos4.1.3 ] Manfred Hollstein
1997-12-27 12:13 ` New problems with gcc-2.8.0 based code - NOW FIXED! Manfred Hollstein
1997-12-28 23:23 ` Richard Stallman
1997-12-29 7:48 ` Jeffrey A Law
1997-12-29 11:17 ` Manfred Hollstein
1997-12-29 10:20 ` Jeffrey A Law
1997-12-30 8:57 ` Manfred Hollstein
1997-12-30 9:47 ` Andi Kleen
1998-01-01 10:02 ` Manfred Hollstein [this message]
1997-12-30 11:33 ` Philip Blundell
1997-12-30 13:17 ` Paul Koning
1997-12-29 11:08 ` Manfred Hollstein
[not found] <199712302041.MAA25118@atrus.synopsys.com>
1997-12-30 13:45 ` Toon Moene
[not found] <9712301949.AA01218@vlsi1.ultra.nyu.edu>
1997-12-30 13:52 ` Paul Koning
1997-12-30 12:27 ` Linus Torvalds
[not found] <9712302109.AA01369@vlsi1.ultra.nyu.edu>
1997-12-30 14:41 ` Paul Koning
1997-12-30 23:05 ` Richard Stallman
[not found] <9712302324.AA01798@vlsi1.ultra.nyu.edu>
1997-12-30 16:39 ` Paul Koning
[not found] <E0xnN2N-0005UN-00@paddington.london.uk.eu.org>
[not found] ` <199801030231.DAA25241@mail.macqel.be>
1998-01-05 10:13 ` Paul Koning
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199801011710.SAA00706@saturn.s-direktnet.de \
--to=manfred@s-direktnet.de \
--cc=Manfred.Hollstein@ks.sel.alcatel.de \
--cc=egcs@cygnus.com \
--cc=gcc2@cygnus.com \
--cc=law@cygnus.com \
--cc=oliva@dcc.unicamp.br \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).