This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Estimated SPEC2000 results for gcc+alpha


> From rth@cygnus.com  Thu Jan 27 15:06:47 2000
> On Thu, Jan 27, 2000 at 11:24:41AM -0500, Brad Lucier wrote:
> >    171.swim                                  X                             
> >    172.mgrid                                 X                             
> >    173.applu                                 X                             
> >    301.apsi                                  X     
> 
> Wow I'm surprised all of these failed.  Or did they update them for f90?

I screwed up the config file.  I'll run the tests again tonight with
the current mainline source; I anticipate that there will be many fewer
failures.

> 
> >    176.gcc                                   X                             
> 
> Is this a compilation failure?

No, it was a runtime failure with gcc-2.95.2; this was not an issue
with the development branch.  Here's the bug report I sent to SPEC.
(I get the same error after removing all the ifdef __GNUC__ as you
suggested in your other post.)  I now believe that it is a problem with
gcc-2.95.2.

Brad

When I compile 176.gcc with gcc-2.95.2 on Red Hat Linux 6.0 with kernel
2.2.13 on a Compaq DS20 alpha 21264 clone, with the following options:

OPTIMIZE     = -mcpu=ev6 -O2 -g -Wall

I get a segfault in flow.c at the bzero at the last line below (line 935):

static void
life_analysis (f, nregs)
     rtx f;
     int nregs;
{
  register regset tem;
  int first_pass;
  int changed;
  /* For each basic block, a bitmask of regs
     live on exit from the block.  */
  regset *basic_block_live_at_end;
  /* For each basic block, a bitmask of regs
     live on entry to a successor-block of this block.
     If this does not match basic_block_live_at_end,
     that must be updated, and the block must be rescanned.  */
  regset *basic_block_new_live_at_end;
  /* For each basic block, a bitmask of regs
     whose liveness at the end of the basic block
     can make a difference in which regs are live on entry to the block.
     These are the regs that are set within the basic block,
     possibly excluding those that are used after they are set.  */
  regset *basic_block_significant;
  register int i;
  rtx insn;

  struct obstack flow_obstack;

  gcc_obstack_init (&flow_obstack);

  max_regno = nregs;

  bzero (regs_ever_live, sizeof regs_ever_live);

  /* Allocate and zero out many data structures
     that will record the data from lifetime analysis.  */

  allocate_for_life_analysis ();

  reg_next_use = (rtx *) alloca (nregs * sizeof (rtx));
  bzero ((char *) reg_next_use, nregs * sizeof (rtx));

  /* Set up several regset-vectors used internally within this function.
     Their meanings are documented above, with their declarations.  */

  basic_block_live_at_end
    = (regset *) alloca (n_basic_blocks * sizeof (regset));

  /* Don't use alloca since that leads to a crash rather than an error message
     if there isn't enough space.
     Don't use oballoc since we may need to allocate other things during
     this function on the temporary obstack.  */
  tem = (regset) obstack_alloc (&flow_obstack, n_basic_blocks * regset_bytes);
  bzero ((char *) tem, n_basic_blocks * regset_bytes);

Here is the output of xxgdb:

(xxgdb) run /export/u11/lucier/programs/SPEC2000/benchspec/CINT2000/176.gcc/run/00000003/166.i
 __sigismember __sigaddset __sigdelset mem_access_latency dl1_access_fn dl2_access_fn il1_access_fn il2_access_fn itlb_access_fn dtlb_access_fn sim_reg_options
Program received signal SIGSEGV, Segmentation fault.
memset_loop () at ../sysdeps/alpha/memset.S:62
../sysdeps/alpha/memset.S:62: No such file or directory.
Current language:  auto; currently asm
(xxgdb) up
#1  0x1200e18c4 in life_analysis (f=0x1204dab98, nregs=347) at flow.c:935
Current language:  auto; currently c
(xxgdb) info locals
tem = 0x20511b00
first_pass = 539669120
changed = 0
basic_block_live_at_end = (regset *) 0x11fffcef8
basic_block_new_live_at_end = (regset *) 0x11fffcef0
basic_block_significant = (regset *) 0x1202ac5b0
i = 539673992
insn = 0x2c
flow_obstack = {
  chunk_size = 4072, 
  chunk = 0x120511ac0, 
  object_base = 0x20511b30 <Address 0x20511b30 out of bounds>, 
  next_free = 0x20511b30 <Address 0x20511b30 out of bounds>, 
  chunk_limit = 0x120512aa8 "ñ\017", 
  temp = 0, 
  alignment_mask = -4294967289, 
  chunkfun = 0x12002a800 <xmalloc>, 
  freefun = 0x20000449b80 <__libc_free>, 
  extra_arg = 0xffffffffffffffff <Address 0xffffffffffffffff out of bounds>, 
  use_extra_arg = -8, 
  maybe_empty_object = -8, 
  alloc_failed = -8
}
(xxgdb) info args
f = 0x1204dab98
nregs = 347

So, at this point tem is invalid pointer, and flow_obstack.alloc_failed is
nonzero, so it indicates the allocation failed.  This does not happen with
-O1 or -O0.

Many, many warnings are reported with the -Wall.  In particular, here
are the more worrying warnings from flow.c:

flow.c: In function `flow_analysis':
flow.c:383: warning: type mismatch in implicit declaration for built-in function `memset'
flow.c: In function `find_basic_blocks':
flow.c:714: warning: implicit declaration of function `simplejump_p'
flow.c: In function `life_analysis':
flow.c:903: warning: implicit declaration of function `gcc_obstack_init'
flow.c:998: warning: implicit declaration of function `volatile_refs_p'
flow.c:1149: warning: type mismatch in implicit declaration for built-in function `memcpy'
flow.c: In function `propagate_block':
flow.c:1376: warning: `regs_sometimes_live' might be used uninitialized in this function
flow.c:1380: warning: `maxlive' might be used uninitialized in this function
flow.c: In function `insn_dead_p':
flow.c:1727: warning: implicit declaration of function `rtx_equal_p'
flow.c: In function `mark_set_1':
flow.c:1966: warning: implicit declaration of function `reg_overlap_mentioned_p'
flow.c:1969: warning: implicit declaration of function `side_effects_p'
flow.c:1973: warning: implicit declaration of function `reg_mentioned_p'
flow.c: In function `mark_used_regs':
flow.c:2511: warning: implicit declaration of function `dead_or_set_p'
flow.c:2524: warning: implicit declaration of function `dead_or_set_regno_p'

So with implicit declarations of important obstack routines, and type
mismatches in built-in functions, I'm having a hard time trying to figure
out where the problem is.  I.e., is it in the code or in the compiler?

Has anything like this been reported before?  Do you have any suggestions
about how I might proceed?  (I sure don't want to compile everything with
-O1 to get around this problem.)

Brad Lucier    lucier@math.purdue.edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]