Bug 42215 - [4.5 Regression] internal compiler error: verify_stmts failed with -O2 -ftree-loop-distribution
Summary: [4.5 Regression] internal compiler error: verify_stmts failed with -O2 -ftree...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.5.0
: P1 normal
Target Milestone: 4.5.0
Assignee: Richard Henderson
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2009-11-29 12:40 UTC by Zdenek Sojka
Modified: 2009-12-02 22:42 UTC (History)
2 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-12-02 19:58:14


Attachments
source file (84 bytes, text/plain)
2009-11-29 12:41 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2009-11-29 12:40:55 UTC
Compiler flags: -O2 -ftree-loop-distribution

Tested revisions:
trunk r154706 (20091127) - crash
trunk r153685 (20091028) - crash
4.4 r153668, r154724 - OK

==== file.c ====
extern int A[];
extern int B[];

void f(int i)
{
   while (i-- > 0) {
     A[i] = 0;
     B[i] = 0;
   }
}
=============

$ /mnt/svn/gcc-trunk/binary-154706-lto/bin/gcc -O2 -ftree-loop-distribution -c file.c -o tmp.o -v
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-154706-lto/bin/gcc
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-154706-lto/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --enable-languages=c,c++,lto --prefix=/mnt/svn/gcc-trunk/binary-154706-lto
Thread model: posix
gcc version 4.5.0 20091127 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-O2' '-ftree-loop-distribution' '-c' '-o' 'tmp.o' '-v' '-mtune=generic'
 /mnt/svn/gcc-trunk/binary-154706-lto/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1 -quiet -v file.c -quiet -dumpbase file.c -mtune=generic -auxbase-strip tmp.o -O2 -version -ftree-loop-distribution -o /tmp/ccGTZYvH.s
GNU C (GCC) version 4.5.0 20091127 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.0 20091127 (experimental), GMP version 4.3.1, MPFR version 2.4.1-p5, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/mnt/svn/gcc-trunk/binary-154706-lto/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /mnt/svn/gcc-trunk/binary-154706-lto/include
 /mnt/svn/gcc-trunk/binary-154706-lto/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include
 /mnt/svn/gcc-trunk/binary-154706-lto/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include-fixed
 /usr/include
End of search list.
GNU C (GCC) version 4.5.0 20091127 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.0 20091127 (experimental), GMP version 4.3.1, MPFR version 2.4.1-p5, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 6ceb3c4a53027ce4dbc9ea8fb31afa70
file.c: In function &#8216;f&#8217;:
file.c:4:6: error: type mismatch in binary expression
long unsigned int

<unnamed-signed:64>

long unsigned int

D.2734_16 = D.2733_15 - D.2730_10;

file.c:4:6: error: type mismatch in binary expression
long unsigned int

<unnamed-signed:64>

long unsigned int

D.2742_24 = D.2741_23 - D.2738_20;

file.c:4:6: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Zdenek Sojka 2009-11-29 12:41:42 UTC
Created attachment 19176 [details]
source file
Comment 2 Richard Henderson 2009-12-02 19:26:47 UTC
Confirmed.
Comment 3 Richard Henderson 2009-12-02 22:35:36 UTC
Subject: Bug 42215

Author: rth
Date: Wed Dec  2 22:35:21 2009
New Revision: 154925

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154925
Log:
        PR tree-opt/42215
        * tree-loop-distribution.c (build_size_arg_loc): Tidy.
        (generate_memset_zero): Convert to sizetype properly.  Tidy.

Added:
    trunk/gcc/testsuite/gcc.dg/pr42215.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-loop-distribution.c

Comment 4 Richard Henderson 2009-12-02 22:42:30 UTC
Fixed.
Comment 5 hjl@gcc.gnu.org 2009-12-12 01:45:51 UTC
Subject: Bug 42215

Author: hjl
Date: Sat Dec 12 01:45:12 2009
New Revision: 155191

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155191
Log:
Backport testcases from trunk.

2009-12-11  H.J. Lu  <hongjiu.lu@intel.com>

	Backport from mainline:
	2009-12-07  Richard Henderson  <rth@redhat.com>

	PR rtl-opt/42269
	* gcc.c-torture/execute/pr42269-2.c: New.

	2009-12-07  Richard Henderson  <rth@redhat.com>

	PR debug/42299
	PR debug/42166
	* gcc.c-torture/compile/pr42299.c: New.
	* gfortran.dg/pr42166.f90: Likewise.

	2009-12-06  Richard Henderson  <rth@redhat.com>

	PR debug/42234
	* gcc.c-torture/compile/pr42234.c: New.

	2009-12-02  Richard Henderson  <rth@redhat.com>

	PR tree-opt/42215
	* gcc.dg/pr42215.c: New.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr42234.c
      - copied unchanged from r155190, trunk/gcc/testsuite/gcc.c-torture/compile/pr42234.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr42299.c
      - copied unchanged from r155190, trunk/gcc/testsuite/gcc.c-torture/compile/pr42299.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr42269-2.c
      - copied unchanged from r155190, trunk/gcc/testsuite/gcc.c-torture/execute/pr42269-2.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr42215.c
      - copied unchanged from r155190, trunk/gcc/testsuite/gcc.dg/pr42215.c
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/pr42166.f90
      - copied unchanged from r155190, trunk/gcc/testsuite/gfortran.dg/pr42166.f90
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog