[Bug tree-optimization/60559] New: g++.dg/vect/pr60023.cc fails with -fno-tree-dce (ICE)

enkovich.gnu at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Mar 18 08:25:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60559

            Bug ID: 60559
           Summary: g++.dg/vect/pr60023.cc fails with -fno-tree-dce (ICE)
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: enkovich.gnu at gmail dot com

Test gcc/testsuite/g++.dg/vect/pr60023.cc -fno-tree-dce fails with ICE if
executed with additional -fno-tree-dce flag.

As I can see the problem is in generated mask load which operated with integer
types:

  int * _13;
  int _14;
  ...
  _14 = MASK_LOAD (_13, 0B, _ifc__37);

With DCE we have LHS of this call removed and then statement ignored in
expand_MASK_LOAD.  But with no DCE we get ICE because there is no proper code
in optab.

I use gcc (GCC) 4.9.0 20140317 (experimental).

gcc -O2 -ftree-vectorize -fno-vect-cost-model -msse2 -fdump-tree-vect-details
-O3 -std=c++11 -fnon-call-exceptions -mavx2 -S -o pr60023.s pr60023.cc
-fno-tree-dce

/export/users/ienkovic/gcc/gcc/testsuite/g++.dg/vect/pr60023.cc: In function
'void f1(int*, int*, int*)':
/export/users/ienkovic/gcc/gcc/testsuite/g++.dg/vect/pr60023.cc:14:17: internal
compiler error: in maybe_gen_insn, at optabs.c:8250
       p[i] = q[i] + 1;
                 ^
0xc421d0 maybe_gen_insn(insn_code, unsigned int, expand_operand*)
        /gnumnt/msticlxl7_users/ienkovic/point-lookout/gcc-pl/gcc/optabs.c:8250
0xc42629 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
        /gnumnt/msticlxl7_users/ienkovic/point-lookout/gcc-pl/gcc/optabs.c:8294
0xc426bd expand_insn(insn_code, unsigned int, expand_operand*)
        /gnumnt/msticlxl7_users/ienkovic/point-lookout/gcc-pl/gcc/optabs.c:8325
0xb27d95 expand_MASK_LOAD
       
/gnumnt/msticlxl7_users/ienkovic/point-lookout/gcc-pl/gcc/internal-fn.c:837
0xb2807f expand_internal_call(gimple_statement_base*)
       
/gnumnt/msticlxl7_users/ienkovic/point-lookout/gcc-pl/gcc/internal-fn.c:886
0x8f483f expand_call_stmt
       
/gnumnt/msticlxl7_users/ienkovic/point-lookout/gcc-pl/gcc/cfgexpand.c:2190
0x8f815a expand_gimple_stmt_1
       
/gnumnt/msticlxl7_users/ienkovic/point-lookout/gcc-pl/gcc/cfgexpand.c:3160
0x8f87a4 expand_gimple_stmt
       
/gnumnt/msticlxl7_users/ienkovic/point-lookout/gcc-pl/gcc/cfgexpand.c:3312
0x8febbd expand_gimple_basic_block
       
/gnumnt/msticlxl7_users/ienkovic/point-lookout/gcc-pl/gcc/cfgexpand.c:5152
0x9006a5 gimple_expand_cfg
       
/gnumnt/msticlxl7_users/ienkovic/point-lookout/gcc-pl/gcc/cfgexpand.c:5731
0x900d20 execute
       
/gnumnt/msticlxl7_users/ienkovic/point-lookout/gcc-pl/gcc/cfgexpand.c:5951



More information about the Gcc-bugs mailing list