Bug 55569 - [4.8 Regression] ICE: in check_probability, at basic-block.h:944 with -ftree-vectorize
Summary: [4.8 Regression] ICE: in check_probability, at basic-block.h:944 with -ftree-...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.8.0
: P1 normal
Target Milestone: 4.8.0
Assignee: Jan Hubicka
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2012-12-02 21:43 UTC by Zdenek Sojka
Modified: 2013-01-09 21:32 UTC (History)
3 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 4.7.3
Known to fail: 4.8.0
Last reconfirmed: 2012-12-02 00:00:00


Attachments
reduced testcase (161 bytes, text/x-csrc)
2012-12-02 21:43 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2012-12-02 21:43:30 UTC
Created attachment 28856 [details]
reduced testcase

Compiler output:
$ gcc -O -ftree-vectorize testcase.C
testcase.C: In function 'void test01()':
testcase.C:13:1: internal compiler error: in check_probability, at basic-block.h:944
 test01 ()
 ^
0x84ddff check_probability
        /mnt/svn/gcc-trunk/gcc/basic-block.h:944
0x84ddff inverse_probability
        /mnt/svn/gcc-trunk/gcc/basic-block.h:972
0x84ddff scale_loop_profile(loop*, int, int)
        /mnt/svn/gcc-trunk/gcc/cfgloopmanip.c:522
0xd85d4e vect_transform_loop(_loop_vec_info*)
        /mnt/svn/gcc-trunk/gcc/tree-vect-loop.c:5739
0xd9e426 vectorize_loops()
        /mnt/svn/gcc-trunk/gcc/tree-vectorizer.c:124
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

$ gcc -v                            
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-latest/bin/gcc
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-194017-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df --enable-languages=c,c++,lto,fortran --prefix=/mnt/svn/gcc-trunk/binary-194017-lto-fortran-checking-yes-rtl-df/ --without-cloog --without-ppl
Thread model: posix
gcc version 4.8.0 20121201 (experimental) (GCC) 

Tested revisions:
r194017 - crash
Comment 1 Dominique d'Humieres 2012-12-02 23:14:54 UTC
Revision 190641 is OK.
Revision 193382 gives the ICE.

Note that there is no ICE for revision 194020 configured with --enable-checking=release.
Comment 2 Marek Polacek 2012-12-03 10:44:08 UTC
Started with http://gcc.gnu.org/viewcvs?view=revision&revision=193667
Comment 3 Jakub Jelinek 2012-12-03 14:09:25 UTC
Simplified testcase (in C):
int *bar (void);

void
foo (void)
{
  long x;
  int *y = bar ();
    for (x = -1 / sizeof (int); x; --x, ++y)
       *y = 0;
}
Comment 4 Jakub Jelinek 2012-12-03 14:31:30 UTC
I think this actually started with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193241
instead.
Comment 5 H.J. Lu 2012-12-03 15:19:33 UTC
It is caused by revision 193241:

http://gcc.gnu.org/ml/gcc-cvs/2012-11/msg00188.html
Comment 6 Jan Hubicka 2013-01-04 22:41:33 UTC
Mine.
Comment 7 Jan Hubicka 2013-01-09 21:29:14 UTC
Author: hubicka
Date: Wed Jan  9 21:29:07 2013
New Revision: 195067

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195067
Log:

	PR tree-optimization/55569
	* cfgloopmanip.c (scale_loop_profile): Make ITERATION_BOUND gcov_type.
	* cfgloop.h (scale_loop_profile): Likewise.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr55569.c   (with props)
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgloop.h
    trunk/gcc/cfgloopmanip.c
    trunk/gcc/testsuite/ChangeLog

Propchange: trunk/gcc/testsuite/gcc.c-torture/compile/pr55569.c
            ('svn:mime-type' added)
Comment 8 Jan Hubicka 2013-01-09 21:32:35 UTC
Fixed.