Bug 60023 - [4.9 Regression] ICE: verify_gimple failed: dead STMT in EH table with -O3 -fnon-call-exceptions -mavx2
Summary: [4.9 Regression] ICE: verify_gimple failed: dead STMT in EH table with -O3 -f...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.9.0
: P1 normal
Target Milestone: 4.9.0
Assignee: Jakub Jelinek
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2014-02-01 09:49 UTC by Zdenek Sojka
Modified: 2014-02-04 13:08 UTC (History)
3 users (show)

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


Attachments
partially reduced testcase (748 bytes, text/x-csrc)
2014-02-01 09:49 UTC, Zdenek Sojka
Details
gcc49-pr60023.patch (1.37 KB, patch)
2014-02-03 16:01 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2014-02-01 09:49:37 UTC
Created attachment 32008 [details]
partially reduced testcase

Compiler output:
$ gcc -O3 -fnon-call-exceptions -mavx2 -std=c++0x testcase.C
testcase.C: In function 'void __copy_move_b(_Bit_iterator, _Bit_iterator)':
testcase.C:110:6: error: dead STMT in EH table
 void __copy_move_b (_Bit_iterator __last, _Bit_iterator __result)
      ^
# VUSE <.MEM_81>
_55 = *SR.55_29(D);
testcase.C:110:6: error: dead STMT in EH table
# .MEM_89 = VDEF <.MEM_79>
*SR.53_41(D) = _45;
testcase.C:110:6: error: dead STMT in EH table
# .MEM_90 = VDEF <.MEM_80>
*SR.54_35(D) = _51;
testcase.C:110:6: error: dead STMT in EH table
# .MEM_91 = VDEF <.MEM_81>
*SR.55_29(D) = _57;
testcase.C:110:6: error: dead STMT in EH table
# .MEM_88 = VDEF <.MEM_78>
*SR.52_47(D) = _39;
testcase.C:110:6: error: dead STMT in EH table
# VUSE <.MEM_82>
_61 = *SR.56_23(D);
testcase.C:110:6: error: dead STMT in EH table
# VUSE <.MEM_22>
_25 = *SR.50_1(D);
testcase.C:110:6: error: dead STMT in EH table
# VUSE <.MEM_83>
_67 = *SR.57_105(D);
testcase.C:110:6: error: dead STMT in EH table
# VUSE <.MEM_77>
_31 = *SR.51_8(D);
testcase.C:110:6: error: dead STMT in EH table
# VUSE <.MEM_84>
_73 = *SR.58_106(D);
testcase.C:110:6: error: dead STMT in EH table
# .MEM_92 = VDEF <.MEM_82>
*SR.56_23(D) = _63;
testcase.C:110:6: error: dead STMT in EH table
# .MEM_86 = VDEF <.MEM_22>
*SR.50_1(D) = _27;
testcase.C:110:6: error: dead STMT in EH table
# .MEM_93 = VDEF <.MEM_83>
*SR.57_105(D) = _69;
testcase.C:110:6: error: dead STMT in EH table
# .MEM_87 = VDEF <.MEM_77>
*SR.51_8(D) = _33;
testcase.C:110:6: error: dead STMT in EH table
# .MEM_94 = VDEF <.MEM_84>
*SR.58_106(D) = _75;
testcase.C:110:6: error: dead STMT in EH table
# VUSE <.MEM_78>
_37 = *SR.52_47(D);
testcase.C:110:6: error: dead STMT in EH table
# VUSE <.MEM_79>
_43 = *SR.53_41(D);
testcase.C:110:6: error: dead STMT in EH table
# VUSE <.MEM_80>
_49 = *SR.54_35(D);
testcase.C:110:6: internal compiler error: verify_gimple failed
0xd16113 verify_gimple_in_cfg(function*)
        /mnt/svn/gcc-trunk/gcc/tree-cfg.c:4940
0xbf10b2 execute_function_todo
        /mnt/svn/gcc-trunk/gcc/passes.c:1853
0xbf1a03 execute_todo
        /mnt/svn/gcc-trunk/gcc/passes.c:1887
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.


This source contains uninitialised variables, but the original unreduced testcase didn't.
Comment 1 H.J. Lu 2014-02-01 15:58:48 UTC
It is caused by r205856.
Comment 2 Jakub Jelinek 2014-02-03 16:01:55 UTC
Created attachment 32029 [details]
gcc49-pr60023.patch

Untested fix.
Comment 3 Jakub Jelinek 2014-02-04 13:08:32 UTC
Author: jakub
Date: Tue Feb  4 13:08:00 2014
New Revision: 207464

URL: http://gcc.gnu.org/viewcvs?rev=207464&root=gcc&view=rev
Log:
	PR tree-optimization/60023
	* tree-if-conv.c (predicate_mem_writes): Pass true instead of
	false to gsi_replace.
	* tree-vect-stmts.c (vect_finish_stmt_generation): If stmt
	has been in some EH region and vec_stmt could throw, add
	vec_stmt into the same EH region.
	* tree-data-ref.c (get_references_in_stmt): If IFN_MASK_LOAD
	has no lhs, ignore it.
	* internal-fn.c (expand_MASK_LOAD): Likewise.

	* g++.dg/vect/pr60023.cc: New test.

Added:
    trunk/gcc/testsuite/g++.dg/vect/pr60023.cc
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/internal-fn.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-data-ref.c
    trunk/gcc/tree-if-conv.c
    trunk/gcc/tree-vect-stmts.c
Comment 4 Jakub Jelinek 2014-02-04 13:08:57 UTC
Fixed.