public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Return of the killer segv (egcs-2.93.21/alphaev56 - nice short test case)
@ 1999-05-31 21:06 Dave Gilbert
  1999-06-25  5:12 ` Jeffrey A Law
  1999-06-30 23:07 ` Richard Henderson
  0 siblings, 2 replies; 4+ messages in thread
From: Dave Gilbert @ 1999-05-31 21:06 UTC (permalink / raw)
  To: egcs-bugs; +Cc: law

On alphaev56-unknown-linux-gnu/egcs-2.93.21 when compiling the following
program (which is a boiled down version of Mesa-3.0 src-glut/glut_dstr.s)
 
--------------------------------------------
void
broken030599(int *n)
{
  int i, x;
  for (i = 0; i < 32; i++) {
    x=0;
    x++;
    if (i & 4)
      x++;
    x++;
  }
}
-----------------------------------------------

I get a Seg fault:

gdb /home/dg/egcs/lib/gcc-lib/alphaev56-unknown-linux-gnu/egcs-2.93.21/cc1
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or 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.
This GDB was configured as "alpha-redhat-linux"...

(gdb) run glut_dstr.i -O2  -o glut_dstr.s

Starting program: /home/dg/egcs/lib/gcc-lib/alphaev56-unknown-linux-gnu/egcs-2.93.21/cc1 glut_dstr.i -O2  -o glut_dstr.s
 broken030599
Program received signal SIGSEGV, Segmentation fault.
validate_change (object=0x11fffe300, loc=0x0, new=0x120342f10, in_group=540472872)
    at recog.c:244
244       rtx old = *loc;
(gdb) where
#0  validate_change (object=0x11fffe300, loc=0x0, new=0x120342f10, in_group=540472872)
    at recog.c:244
#1  0x1200e5670 in strength_reduce (scan_start=0x1203695f0, end=0x12036adb8, 
    loop_top=0x0, insn_count=17, loop_start=0x120369580, loop_end=0x12036adb8, 
    loop_cont=0x12036a218, unroll_p=0, bct_p=0) at loop.c:4203
#2  0x1200df334 in scan_loop (loop_start=0x120369580, end=0x12036adb8, 
    loop_cont=0x12036a218, unroll_p=0, bct_p=0) at loop.c:1172
#3  0x1200ddd74 in loop_optimize (f=0x1203325b8, dumpfile=0x0, unroll_p=0, bct_p=0)
    at loop.c:574
#4  0x120006740 in rest_of_compilation (decl=0x120368728) at toplev.c:3920
#5  0x1201b8ab4 in finish_function (nested=0) at c-decl.c:7268
#6  0x1201a3a9c in yyparse () at c-parse.y:313
#7  0x120004fe4 in compile_file (name=0x11ffffa29 "glut_dstr.i") at toplev.c:3246
#8  0x120009498 in main (argc=5, argv=0x11ffff7e8) at toplev.c:5422


(Mesa seems to be incredibly good at extracting the segfaults from EGCS -
I wonder why).

Dave
 --------------------------------------------------------------------   
/ Dr. David Alan Gilbert      | Running Linux on           |  Happy  \ 
\   gro.gilbert @ treblig.org |     Alpha, ARM and SPARC   |  In Hex /
 \____________________________|___ http://www.treblig.demon.co.uk __/



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

* Re: Return of the killer segv (egcs-2.93.21/alphaev56 - nice short test case)
  1999-05-31 21:06 Return of the killer segv (egcs-2.93.21/alphaev56 - nice short test case) Dave Gilbert
@ 1999-06-25  5:12 ` Jeffrey A Law
  1999-06-30 23:07 ` Richard Henderson
  1 sibling, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1999-06-25  5:12 UTC (permalink / raw)
  To: Dave Gilbert; +Cc: egcs-bugs

  In message <Pine.LNX.3.96.990503225957.19966D-100000@tardis>you write:
  > On alphaev56-unknown-linux-gnu/egcs-2.93.21 when compiling the following
  > program (which is a boiled down version of Mesa-3.0 src-glut/glut_dstr.s)
  >  
  > --------------------------------------------
  > void
  > broken030599(int *n)
  > {
  >   int i, x;
  >   for (i = 0; i < 32; i++) {
  >     x=0;
  >     x++;
  >     if (i & 4)
  >       x++;
  >     x++;
  >   }
  > }
[ ... ]
I just tried this with the current gcc-2.95 prerelease code and it worked fine.
Presumably this bug has been fixed.

I've also added this test to the regression testsuite.
jeff


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

* Re: Return of the killer segv (egcs-2.93.21/alphaev56 - nice short test case)
  1999-05-31 21:06 Return of the killer segv (egcs-2.93.21/alphaev56 - nice short test case) Dave Gilbert
  1999-06-25  5:12 ` Jeffrey A Law
@ 1999-06-30 23:07 ` Richard Henderson
  1999-06-30 23:07   ` Return of the killer segv (egcs-2.93.21/alphaev56 - nice shorttest case) Dave Gilbert
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Henderson @ 1999-06-30 23:07 UTC (permalink / raw)
  To: Dave Gilbert; +Cc: egcs-bugs

On Mon, May 03, 1999 at 11:04:28PM +0100, Dave Gilbert wrote:
> On alphaev56-unknown-linux-gnu/egcs-2.93.21 when compiling the following
> program (which is a boiled down version of Mesa-3.0 src-glut/glut_dstr.s)
>  
> --------------------------------------------
> void
> broken030599(int *n)
> {
>   int i, x;
>   for (i = 0; i < 32; i++) {
>     x=0;
>     x++;
>     if (i & 4)
>       x++;
>     x++;
>   }
> }
> -----------------------------------------------
> 
> I get a Seg fault:

I don't see that anymore with today's cvs.  Can you still 
reproduce the problem?


r~


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

* Re: Return of the killer segv (egcs-2.93.21/alphaev56 - nice shorttest case)
  1999-06-30 23:07 ` Richard Henderson
@ 1999-06-30 23:07   ` Dave Gilbert
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Gilbert @ 1999-06-30 23:07 UTC (permalink / raw)
  To: Richard Henderson; +Cc: egcs-bugs

On Fri, 4 Jun 1999, Richard Henderson wrote:

> On Mon, May 03, 1999 at 11:04:28PM +0100, Dave Gilbert wrote:
> > On alphaev56-unknown-linux-gnu/egcs-2.93.21 when compiling the following
> > program (which is a boiled down version of Mesa-3.0 src-glut/glut_dstr.s)
> >  
> > --------------------------------------------
> > void
> > broken030599(int *n)
> > {
> >   int i, x;
> >   for (i = 0; i < 32; i++) {
> >     x=0;
> >     x++;
> >     if (i & 4)
> >       x++;
> >     x++;
> >   }
> > }
> > -----------------------------------------------
> > 
> > I get a Seg fault:
> 
> I don't see that anymore with today's cvs.  Can you still 
> reproduce the problem?

Yep - it seems to have gone; I've just built Mesa-3.0 with -O6 and it
seems happy. (and giving reasonable performance figures).

Dave

 --------------------------------------------------------------------   
/ Dr. David Alan Gilbert      | Running Linux on           |  Happy  \ 
\   gro.gilbert @ treblig.org |  Alpha, x86, ARM and SPARC |  In Hex /
 ____________________________|___ http://www.treblig.demon.co.uk __/


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

end of thread, other threads:[~1999-06-30 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-31 21:06 Return of the killer segv (egcs-2.93.21/alphaev56 - nice short test case) Dave Gilbert
1999-06-25  5:12 ` Jeffrey A Law
1999-06-30 23:07 ` Richard Henderson
1999-06-30 23:07   ` Return of the killer segv (egcs-2.93.21/alphaev56 - nice shorttest case) Dave Gilbert

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