public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/42604]  New: [4.5 Regression] VTA ICE in the vectorizer
@ 2010-01-04 10:29 jakub at gcc dot gnu dot org
  2010-01-04 10:30 ` [Bug debug/42604] " jakub at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-04 10:29 UTC (permalink / raw)
  To: gcc-bugs

/* { dg-do compile } */
/* { dg-options "-O3 -g -ffast-math" } */

unsigned *d;
unsigned short e;
int f;
float h[3][4];

void
test (unsigned short *b)
{
  int a, c, i;
  float g[3];
  unsigned j[32] = { 10, 0x63707274 };
  for (i = 0; i < (int) j[0]; i++)
    {
      j[i * 3 + 2] = d[0];
      d[0] += (j[i * 3 + 3] + 3) & -4;
    }
  for (a = 0; a < e; a++)
    {
      g[0] = g[1] = g[2] = 0;
      for (c = 0; c < f; c++)
        {
          g[0] += h[0][c] * b[c];
          g[1] += h[1][c] * b[c];
        }
      for (c = 0; c < 3; c++)
        b[c] = 0 > ((int) g[c] < 65535 ? ((int) g[c]) : 65535) ? 0 : ((int)
g[c]) < 65535 ? (int) g[c] : 65535;
    }
}

ICEs with
internal compiler error: gimple check: expected gimple_phi(error_mark), have
gimple_debug() in gimple_phi_result_ptr, at gimple.h:3106
(and without checking just segfaults).
For i?86-linux ICEs/segfaults with additional -m32 -msse2.
The bug is (likely) in vect_create_epilog_for_reduction - phis vector contains
not just
g$1_145 = PHI <g$1_50(9)>
but also
# DEBUG g$1 => g$1_50
and for the latter obviously PHI_RESULT (exit_phi) is invalid.  Not sure if we
should completely ignore DEBUG_STMTs found in:
  phis = VEC_alloc (gimple, heap, 10);
  FOR_EACH_IMM_USE_FAST (use_p, imm_iter, scalar_dest)
    {
      if (!flow_bb_inside_loop_p (loop, gimple_bb (USE_STMT (use_p))))
        {
          exit_phi = USE_STMT (use_p);
          VEC_quick_push (gimple, phis, exit_phi);
        }
    }
(not add them to the vector at all), or if we need to handle it specially.


-- 
           Summary: [4.5 Regression] VTA ICE in the vectorizer
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
GCC target triplet: x86_64-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42604


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

end of thread, other threads:[~2010-02-07  4:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-04 10:29 [Bug debug/42604] New: [4.5 Regression] VTA ICE in the vectorizer jakub at gcc dot gnu dot org
2010-01-04 10:30 ` [Bug debug/42604] " jakub at gcc dot gnu dot org
2010-01-04 15:14 ` jakub at gcc dot gnu dot org
2010-01-09 14:41 ` aoliva at gcc dot gnu dot org
2010-01-09 14:52 ` aoliva at gcc dot gnu dot org
2010-01-13 10:06 ` jakub at gcc dot gnu dot org
2010-02-07  4:48 ` hjl at gcc dot gnu dot org

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