Bug 59670 - ICE: expected gimple_call(error_mark), have gimple_assign(plus_expr) in gimple_call_internal_p, at gimple.h:2432
Summary: ICE: expected gimple_call(error_mark), have gimple_assign(plus_expr) in gimpl...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: 4.9.0
Assignee: Jakub Jelinek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-03 21:31 UTC by Zdenek Sojka
Modified: 2014-01-09 23:42 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work:
Known to fail: 4.9.0
Last reconfirmed: 2014-01-07 00:00:00


Attachments
reduced testcase (126 bytes, text/x-csrc)
2014-01-03 21:31 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2014-01-03 21:31:05 UTC
Created attachment 31568 [details]
reduced testcase

Compiler output:
$ gcc -O -fopenmp testcase.c         
testcase.c: In function 'foo':
testcase.c:4:1: internal compiler error: gimple check: expected gimple_call(error_mark), have gimple_assign(plus_expr) in gimple_call_internal_p, at gimple.h:2432
 foo (int j, int b)
 ^
0x90792c gimple_check_failed(gimple_statement_base const*, char const*, int, char const*, gimple_code, tree_code)
        /mnt/svn/gcc-trunk/gcc/gimple.c:1132
0x62b077 gimple_call_internal_p
        /mnt/svn/gcc-trunk/gcc/gimple.h:2432
0x1409ded gimple_call_internal_p
        /mnt/svn/gcc-trunk/gcc/tree-vect-data-refs.c:3328
0x1409ded vect_analyze_data_refs(_loop_vec_info*, _bb_vec_info*, int*)
        /mnt/svn/gcc-trunk/gcc/tree-vect-data-refs.c:3323
0xd347a7 vect_analyze_loop_2
        /mnt/svn/gcc-trunk/gcc/tree-vect-loop.c:1636
0xd347a7 vect_analyze_loop(loop*)
        /mnt/svn/gcc-trunk/gcc/tree-vect-loop.c:1846
0xd4b6c8 vectorize_loops()
        /mnt/svn/gcc-trunk/gcc/tree-vectorizer.c:430
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-206310-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/4.9.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-206310-lto-fortran-checking-yes-rtl-df/ --without-cloog --without-ppl
Thread model: posix
gcc version 4.9.0 20140103 (experimental) (GCC) 

Tested revisions:
r206310 - crash
4.8 - ignoring #pragma omp simd
Comment 1 Richard Biener 2014-01-07 11:29:28 UTC
Confirmed.  The predicate doesn't check the stmt is a call.
Comment 2 Jakub Jelinek 2014-01-09 23:39:38 UTC
Author: jakub
Date: Thu Jan  9 23:39:06 2014
New Revision: 206503

URL: http://gcc.gnu.org/viewcvs?rev=206503&root=gcc&view=rev
Log:
	PR middle-end/59670
	* tree-vect-data-refs.c (vect_analyze_data_refs): Check
	is_gimple_call before calling gimple_call_internal_p.

	* gcc.dg/pr59670.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr59670.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-data-refs.c
Comment 3 Jakub Jelinek 2014-01-09 23:42:02 UTC
Fixed.