Bug 70726 - [6/7 Regression] Internal compiler error (ICE) on valid code
Summary: [6/7 Regression] Internal compiler error (ICE) on valid code
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 7.0
: P3 normal
Target Milestone: 6.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks: yarpgen
  Show dependency treegraph
 
Reported: 2016-04-19 09:16 UTC by Anton Mitrokhin
Modified: 2021-11-01 23:07 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work: 5.3.0
Known to fail:
Last reconfirmed: 2016-04-19 00:00:00


Attachments
Reproducer (354 bytes, text/x-csrc)
2016-04-19 09:16 UTC, Anton Mitrokhin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Mitrokhin 2016-04-19 09:16:35 UTC
Created attachment 38307 [details]
Reproducer

GCC gives internal compiler error on knl, broadwell and skylake-avx512 targets with -O3 and -Ofast.


Reproducer:
> g++ -std=c++11 -Ofast -march=knl -c -o out small.cpp
> g++ -std=c++11 -Ofast -march=broadwell -c -o out small.cpp
> g++ -std=c++11 -Ofast -march=skylake-avx512 -c -o out small.cpp


Output:
small.cpp: In function 'void fn1()':
small.cpp:9:6: internal compiler error: Segmentation fault
 void fn1() {
      ^~~
0xcf8d3f crash_signal
        /export/users/gnutester/stability/svn/trunk/gcc/toplev.c:335
0xa71c81 is_gimple_reg_type
        /export/users/gnutester/stability/svn/trunk/gcc/gimple-expr.h:75
0xa71c81 is_gimple_val(tree_node*)
        /export/users/gnutester/stability/svn/trunk/gcc/gimple-expr.c:781
0xd26cdf verify_gimple_assign_binary
        /export/users/gnutester/stability/svn/trunk/gcc/tree-cfg.c:3704
0xd3a063 verify_gimple_in_cfg(function*, bool)
        /export/users/gnutester/stability/svn/trunk/gcc/tree-cfg.c:5052
0xc2e1a3 execute_function_todo
        /export/users/gnutester/stability/svn/trunk/gcc/passes.c:1968
0xc2eb6b execute_todo
        /export/users/gnutester/stability/svn/trunk/gcc/passes.c:2020
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=gcc
COLLECT_LTO_WRAPPER=/export/users/amitrokh/gcc_trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /export/users/gnutester/stability/svn/trunk/configure --with-arch=corei7 --with-cpu=corei7 --enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld --enable-cloog-backend=isl --with-fpmath=sse --with-pkgversion=Revision=235172/svn-rev:235172/ --prefix=/export/users/gnutester/stability/work/trunk/64/install --enable-languages=c,c++,fortran,java,lto
Thread model: posix
gcc version 7.0.0 20160418 (experimental) (Revision=235172/svn-rev:235172/)
Comment 1 Richard Biener 2016-04-19 10:00:51 UTC
Confirmed.  We end up with a released SSA name in the IL after BB vectorization.
Comment 2 Richard Biener 2016-04-19 10:40:13 UTC
I will have a look.
Comment 3 Richard Biener 2016-04-20 07:20:47 UTC
Author: rguenth
Date: Wed Apr 20 07:20:16 2016
New Revision: 235236

URL: https://gcc.gnu.org/viewcvs?rev=235236&root=gcc&view=rev
Log:
2016-04-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70726
	* tree-vect-stmts.c (vectorizable_shift): Do not use scalar
	shift amounts from a pattern stmt operand.

	* g++.dg/vect/pr70726.cc: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/vect/pr70726.cc
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-stmts.c
Comment 4 Richard Biener 2016-04-20 07:22:11 UTC
Fixed.
Comment 5 Richard Biener 2016-04-20 07:22:14 UTC
Author: rguenth
Date: Wed Apr 20 07:21:42 2016
New Revision: 235237

URL: https://gcc.gnu.org/viewcvs?rev=235237&root=gcc&view=rev
Log:
2016-04-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70726
	* tree-vect-stmts.c (vectorizable_shift): Do not use scalar
	shift amounts from a pattern stmt operand.

	* g++.dg/vect/pr70726.cc: New testcase.

Added:
    branches/gcc-6-branch/gcc/testsuite/g++.dg/vect/pr70726.cc
Modified:
    branches/gcc-6-branch/gcc/ChangeLog
    branches/gcc-6-branch/gcc/testsuite/ChangeLog
    branches/gcc-6-branch/gcc/tree-vect-stmts.c