Bug 41888 - [4.5 Regression] ICE from '-O -ftree-loop-distribution -fgraphite-identity -g'
Summary: [4.5 Regression] ICE from '-O -ftree-loop-distribution -fgraphite-identity -g'
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.5.0
: P2 normal
Target Milestone: 4.5.0
Assignee: Alexandre Oliva
URL:
Keywords:
: 41887 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-31 05:38 UTC by Bake Timmons
Modified: 2009-11-18 06:22 UTC (History)
2 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail: 4.4.2
Last reconfirmed: 2009-11-05 06:41:30


Attachments
gzipped preprocessed source triggering failure (73.70 KB, application/gzip)
2009-10-31 05:39 UTC, Bake Timmons
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bake Timmons 2009-10-31 05:38:19 UTC
gcc -B. -r -nostdlib edid.i -v -Wall -Wextra -O -ftree-loop-distribution -fgraphite-identity -g
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/b3po/build/gcc/gcc/configure --with-mpfr=/usr/local --with-gmp=/usr/local --with-ppl=/usr/local --with-cloog=/usr/local --with-mpc=/usr/local --with-libelf=/usr/local --enable-languages=c,c++ --enable-__cxa_atexit --enable-targets=all
Thread model: posix
gcc version 4.5.0 20091028 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-B.' '-r' '-nostdlib' '-v' '-Wall' '-Wextra' '-O' '-ftree-loop-distribution' '-fgraphite-identity' '-g' '-mtune=generic'
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1 -fpreprocessed edid.i -quiet -dumpbase edid.i -mtune=generic -auxbase edid -g -O -Wall -Wextra -version -ftree-loop-distribution -fgraphite-identity -o /tmp/ccioPiLW.s
GNU C (GCC) version 4.5.0 20091028 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.0 20091028 (experimental), GMP version 4.3.1, MPFR version 2.4.1, MPC version 0.7
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.5.0 20091028 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.0 20091028 (experimental), GMP version 4.3.1, MPFR version 2.4.1, MPC version 0.7
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: c30658ecf2032071e4fe041bf17f02de
edid.c: In function ‘GetEDID_DDC1’:
edid.c:25:1: internal compiler error: in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:424
Comment 1 Bake Timmons 2009-10-31 05:39:43 UTC
Created attachment 18938 [details]
gzipped preprocessed source triggering failure
Comment 2 Richard Biener 2009-10-31 11:32:34 UTC
Likewise.
Comment 3 Jakub Jelinek 2009-11-02 12:02:00 UTC
Simplified testcase:
/* { dg-do compile } */
/* { dg-options "-g -O -ftree-loop-distribution -fgraphite-identity" } */

int
foo (int *x)
{
  int a[10], b[10];
  int i;
  a[9] = 8;
  b[9] = 8;
  for (i = 0; i < 9; i++)
    {
      a[i] = *x++;
      b[i] = 1;
    }
  b[i] = b[i] & !(a[i] ^ *x++);
  return b[i] ? i + 1 : 0;
}
Comment 4 Sebastian Pop 2009-11-02 16:53:21 UTC
This testcase does work on the Graphite branch 
where I did not merged changes from trunk from the time when 
VTA was merged to trunk.  See PR41401 as well.
Comment 5 Alexandre Oliva 2009-11-05 06:41:30 UTC
Thanks.  I was missing the libraries needed for graphite, so I hadn't ever tested it :-(

My patches for bug 41926 (not posted yet) fixes the ICE, but we still fail -fcompare-debug.  I'll work out where graphite code needs to be adjusted to support VTA.
Comment 6 Alexandre Oliva 2009-11-05 19:11:13 UTC
*** Bug 41887 has been marked as a duplicate of this bug. ***
Comment 7 Alexandre Oliva 2009-11-18 06:02:50 UTC
Subject: Bug 41888

Author: aoliva
Date: Wed Nov 18 06:02:26 2009
New Revision: 154279

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154279
Log:
PR debug/41888
PR debug/41886
* graphite-scop-detection.c (stmt_simple_for_scop_p): Debug stmts
are ok.
* graphite-sese-to-poly.c (graphite_stmt_p): Likewise.
(try_generate_gimple_bb): Skip debug stmts when finding data refs.
* sese.c (sese_build_liveouts_bb): Skip debug stmts.
(sese_bad_liveouts_use): New.
(sese_reset_debug_liveouts_bb): New.
(sese_build_liveouts): Use it.
(rename_variables_in_stmt): Reset debug stmts rather than creating
new vars for them.
(expand_scalar_variable_stmt): Likewise.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/graphite-scop-detection.c
    trunk/gcc/graphite-sese-to-poly.c
    trunk/gcc/sese.c

Comment 8 Alexandre Oliva 2009-11-18 06:22:05 UTC
Fixed