public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Current CVS source on m68k-next-nextstep3 chokes on first stage2compile with segmentation violation
@ 1998-03-21 10:36 Toon Moene
  1998-03-22 10:09 ` Toon Moene
  1998-03-24 14:49 ` Jim Wilson
  0 siblings, 2 replies; 4+ messages in thread
From: Toon Moene @ 1998-03-21 10:36 UTC (permalink / raw)
  To: egcs

Hi All,

Using the current CVS source (in fact, the problem has been there  
for over a day) on m68k-next-nextstep3, I get the following  
segmentation violation on the first stage2 compile:

make CC="stage1/xgcc -Bstage1/" CFLAGS="-W -Wall -O2 -g -O2"  
LDFLAGS="" libdir=/usr/snp/lib STAGE_PREFIX=stage1/ LANGUAGES="c  
proto gcov  c++ f77 objc"
make[2]: Entering directory  
`/Users/toon/Unix/compilers/snapshots/obj/gcc'
stage1/xgcc -Bstage1/  -DIN_GCC    -W -Wall -O2 -g -O2   
-DHAVE_CONFIG_H     -I. -I../../egcs/gcc -I../../egcs/gcc/config \
   
-DGCC_INCLUDE_DIR=\"/usr/snp/lib/gcc-lib/m68k-next-nextstep3/egcs-2.91.14/include\"  
\
  -DGPLUSPLUS_INCLUDE_DIR=\"/usr/snp/include/g++\" \
  -DOLD_GPLUSPLUS_INCLUDE_DIR=\"/usr/snp/lib/g++-include\" \
  -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
  -DCROSS_INCLUDE_DIR=\"/usr/snp/m68k-next-nextstep3/sys-include\" \
  -DTOOL_INCLUDE_DIR=\"/usr/snp/m68k-next-nextstep3/include\" \
  -c `echo ../../egcs/gcc/cccp.c | sed 's,^\./,,'`
.../../egcs/gcc/cccp.c: In function `safe_read':
.../../egcs/gcc/cccp.c:1146: warning: implicit declaration of  
function `read'
.../../egcs/gcc/cccp.c: In function `safe_write':
.../../egcs/gcc/cccp.c:1181: warning: implicit declaration of  
function `write'
.../../egcs/gcc/cccp.c: In function `main':
.../../egcs/gcc/cccp.c:2140: warning: implicit declaration of  
function `open'
.../../egcs/gcc/cccp.c:2176: warning: comparison between signed and  
unsigned
xgcc: Internal compiler error: program cc1 got fatal signal 11
make[2]: *** [cccp.o] Error 1
make[2]: Leaving directory `/Users/toon/Unix/compilers/snapshots/obj/gcc'
make[1]: *** [bootstrap] Error 2
make[1]: Leaving directory `/Users/toon/Unix/compilers/snapshots/obj/gcc'
make: *** [bootstrap] Error 2

The gdb traceback shows:

% gdb stage1/cc1
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for  
details.
GDB 4.7 (NeXT 3.1), Copyright 1992 Free Software Foundation, Inc...
Reading symbols from  
/Users/toon/Unix/compilers/snapshots/obj/gcc/stage1/cc1...done.
Reading symbols from /usr/shlib/libsys_s.B.shlib...done.

Breakpoint 1 at 0x505676a
(gdb) run  cccp.i -quiet -dumpbase cccp.c -g -O2 -O2 -W -Wall  
-version -o cccp.s
Starting program:  
/Users/toon/Unix/compilers/snapshots/obj/gcc/stage1/cc1 cccp.i  
-quiet -dumpbase cccp.c -g -O2 -O2 -W -Wall -version -o cccp.s
GNU C version egcs-2.91.14 980315 (gcc-2.8.0 release)  
(m68k-next-nextstep3) compiled by GNU C version 2.7.2.3.f.2.
.../../egcs/gcc/cccp.c: In function `safe_read':
.../../egcs/gcc/cccp.c:1146: warning: implicit declaration of  
function `read'
.../../egcs/gcc/cccp.c: In function `safe_write':
.../../egcs/gcc/cccp.c:1181: warning: implicit declaration of  
function `write'
.../../egcs/gcc/cccp.c: In function `main':
.../../egcs/gcc/cccp.c:2140: warning: implicit declaration of  
function `open'
.../../egcs/gcc/cccp.c:2176: warning: comparison between signed and  
unsigned
Program generated(1): Memory access exception on address 0xfffffffc  
(invalid address).
Reading in symbols for ../../egcs/gcc/expr.c...done.
0x55d8a in protect_from_queue (x=0xfffffffc, modify=0) at  
.../../egcs/gcc/expr.c:397
397       register RTX_CODE code = GET_CODE (x);
(gdb) bt
Reading in symbols for ../../egcs/gcc/loop.c...done.
Reading in symbols for ../../egcs/gcc/toplev.c...done.
Reading in symbols for ../../egcs/gcc/c-decl.c...done.
Reading in symbols for ../../egcs/gcc/c-parse.c...done.
#0  0x55d8a in protect_from_queue (x=0xfffffffc, modify=0) at  
.../../egcs/gcc/expr.c:397
#1  0x58bf4 in emit_move_insn (x=0x557f74, y=0xfffffffc) at  
.../../egcs/gcc/expr.c:2172
#2  0xc93da in move_movables (movables=0x3ff3390, threshold=24,  
insn_count=138, loop_start=0x4e4dfc, end=0x558538, nregs=635) at  
.../../egcs/gcc/loop.c:1960
#3  0xc7aa6 in scan_loop (loop_start=0x4e4dfc, end=0x558538,  
nregs=635, unroll_p=0) at ../../egcs/gcc/loop.c:1056
#4  0xc69da in loop_optimize (f=0x4ef370, dumpfile=0x0, unroll_p=0)  
at ../../egcs/gcc/loop.c:521
#5  0x29204 in rest_of_compilation (decl=0x49fab4) at  
.../../egcs/gcc/toplev.c:3285
#6  0x1530e in finish_function (nested=0) at ../../egcs/gcc/c-decl.c:7116
#7  0x3f42 in yyparse () at c-parse.y:319
#8  0x280dc in compile_file (name=0x3fffc0c "cccp.i") at  
.../../egcs/gcc/toplev.c:2556
#9  0x2ac2e in main (argc=13, argv=0x3fffb6c, envp=0x3fffba4) at  
.../../egcs/gcc/toplev.c:4361
(gdb) quit

The rtx pointer passed as the second argument to emit_move_insn is  
obviously bogus; however, it's not clear to me how this comes about.  
 Because move_movables is just running down a list of structs being  
prepared earlier, the problem could lie further up the chain.   
Someone have a good idea to tackle this ?

TIA,
Toon.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Current CVS source on m68k-next-nextstep3 chokes on first stage2compile with segmentation violation
  1998-03-21 10:36 Current CVS source on m68k-next-nextstep3 chokes on first stage2compile with segmentation violation Toon Moene
@ 1998-03-22 10:09 ` Toon Moene
  1998-03-24  0:03   ` Current CVS source on m68k-next-nextstep3 chokes on first stage2 compile " Jeffrey A Law
  1998-03-24 14:49 ` Jim Wilson
  1 sibling, 1 reply; 4+ messages in thread
From: Toon Moene @ 1998-03-22 10:09 UTC (permalink / raw)
  To: wilson; +Cc: egcs

I wrote:

>  Using the current CVS source (in fact, the problem has
>  been there for over a day) on m68k-next-nextstep3, I get
>  the following segmentation violation on the first stage2
>  compile:

[ ... etc. ... ]

I managed to "solve" this by removing (i.e. patch -R'ing) the  
following change by Jim Wilson:

Wed Mar 18 12:43:20 1998  Jim Wilson  <wilson@cygnus.com>

        * loop.c (struct movable): New field move_insn_first.
        (scan_loop): In consec sets code, set it.  Clear it otherwise.
        (move_movables): In consec sets code, use it.  Copy  
REG_NOTES from
        p to i1 only if i1 does not have REG_NOTES.  Delete  
obsolete ifdefed
        out code.

This is most probably not the appropriate fix; unfortunately, I  
didn't manage to find out what was wrong with the change as such -  
the fault could also simply be another bug triggered by this change.

HTH,
Toon.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Current CVS source on m68k-next-nextstep3 chokes on first stage2 compile with segmentation violation
  1998-03-22 10:09 ` Toon Moene
@ 1998-03-24  0:03   ` Jeffrey A Law
  0 siblings, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1998-03-24  0:03 UTC (permalink / raw)
  To: Toon Moene; +Cc: wilson, egcs

  In message < 9803221545.AA17859@moene.indiv.nluug.nl >you write:
  > >  Using the current CVS source (in fact, the problem has
  > >  been there for over a day) on m68k-next-nextstep3, I get
  > >  the following segmentation violation on the first stage2
  > >  compile:
My m68k box seems to be alive again (can you say impending total
disk failure? :-).  I've got a build running.  It'll take a while
before it's far enough along that I can look into the problem.

[ ... ]

  > This is most probably not the appropriate fix; unfortunately, I  
  > didn't manage to find out what was wrong with the change as such -  
  > the fault could also simply be another bug triggered by this change.
The gcse code exposed a latent loop bug when bootstrapping
sparc-solaris.  Thus I'm not suprised you weren't able to find
the bug triggered by undoing Jim's change :-)

jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Current CVS source on m68k-next-nextstep3 chokes on first stage2 compile with segmentation violation
  1998-03-21 10:36 Current CVS source on m68k-next-nextstep3 chokes on first stage2compile with segmentation violation Toon Moene
  1998-03-22 10:09 ` Toon Moene
@ 1998-03-24 14:49 ` Jim Wilson
  1 sibling, 0 replies; 4+ messages in thread
From: Jim Wilson @ 1998-03-24 14:49 UTC (permalink / raw)
  To: Toon Moene; +Cc: egcs, law

An unintialized variable problem.  Here is a patch to fix it.

Tue Mar 24 13:10:38 1998  Jim Wilson  <wilson@cygnus.com>

	* loop.c (scan_loop): Initialize move_insn_first to zero.

Index: loop.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/loop.c,v
retrieving revision 1.36
diff -p -r1.36 loop.c
*** loop.c	1998/03/20 14:58:10	1.36
--- loop.c	1998/03/24 21:10:31
*************** scan_loop (loop_start, end, nregs, unrol
*** 950,955 ****
--- 950,956 ----
  		  m->done = 0;
  		  m->forces = 0;
  		  m->move_insn = 0;
+ 		  m->move_insn_first = 0;
  		  m->partial = 1;
  		  /* If the insn may not be executed on some cycles,
  		     we can't clear the whole reg; clear just high part.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-03-24 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-21 10:36 Current CVS source on m68k-next-nextstep3 chokes on first stage2compile with segmentation violation Toon Moene
1998-03-22 10:09 ` Toon Moene
1998-03-24  0:03   ` Current CVS source on m68k-next-nextstep3 chokes on first stage2 compile " Jeffrey A Law
1998-03-24 14:49 ` Jim Wilson

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).