public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: janis187@us.ibm.com
To: gcc-gnats@gcc.gnu.org
Subject: target/5446: ICE with -O3 on ia64 in verify_local_live_at_start()
Date: Mon, 21 Jan 2002 14:06:00 -0000	[thread overview]
Message-ID: <20020121220210.25166.qmail@sources.redhat.com> (raw)


>Number:         5446
>Category:       target
>Synopsis:       ICE with -O3 on ia64 in verify_local_live_at_start()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 21 14:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Janis Johnson
>Release:        gcc version 3.1 20020120 (experimental)
>Organization:
>Environment:
ia64-unknown-linux; Red Hat Linux release 7.1.94 (Roswell)
plus binutils 2.11.92.0.7
>Description:
This test case, which is a very slightly cut down version
of the test gcc.c-torture/compile/20011219-1.c, causes an
ICE in the current CVS when compiled with -O3 on ia64-linux:
                                                          
elm3a81% gcc-latest -v
Reading specs from /home/build/gcc_mainline/ia64/install/lib/gcc-lib/ia64-unknown-linux/3.1/specs
Configured with: ../../gcc/configure --prefix=/home/build/gcc_mainline/ia64/install
Thread model: single
gcc version 3.1 20020120 (experimental)

elm3a81% gcc-latest -O3 -DTRIM -c bug.c
bug.c: In function `foo':
bug.c:36: Internal compiler error in verify_local_live_at_start, at flow.c:578
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

The original version of the test gets an ICE with
"-O3 -fprefetch-loop-arrays".
>How-To-Repeat:
gcc -O3 -c -DTRIM bug.c
>Fix:
A workaround is to use -O2 rather than -O3.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="bug.c"
Content-Disposition: inline; filename="bug.c"

/* This testcase is the same as gcc.c-torture/compile/20011219-1.c except
   that parts of it can be omitted, causing an ICE with -O3 on IA-64.
   The original test case causes an ICE with -O3 -fprefetch-loop-arrays
   on IA-64.  */

void * baz (unsigned long);
static inline double **
bar (long w, long x, long y, long z)
{
  long i, a = x - w + 1, b = z - y + 1;
  double **m = (double **) baz (sizeof (double *) * (a + 1));

  m += 1;
  m -= w;
  m[w] = (double *) baz (sizeof (double) * (a * b + 1));
#ifndef TRIM
  m[w] += 1;
  m[w] -= y;
#endif
  for (i = w + 1; i <= x; i++)
    m[i] = m[i - 1] + b;
  return m;
}

void
foo (double w[], int x, double y[], double z[])
{
  int i;
  double **a;

  a = bar (1, 50, 1, 50);
#ifndef TRIM
  for (i = 1; i <= x; i++)
    a[1][i] = - w[x - i] / w[x];
#endif
}


                 reply	other threads:[~2002-01-21 22:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20020121220210.25166.qmail@sources.redhat.com \
    --to=janis187@us.ibm.com \
    --cc=gcc-gnats@gcc.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).