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



             Bug #: 55359

           Summary: [4.8 Regression] ICE in simplify_subreg accessing an

                    unaligned subvector

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: middle-end

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: gli...@gcc.gnu.org





I am not quite sure if this code is legal. I noticed it first with a

BIT_FIELD_REF (generated by a local patch), but it also happens with a MEM_REF.

The code generated by 4.7 seems correct, even if it isn't optimal.



$ cat s.c

#include <x86intrin.h>



__m128d f(__m256d x){

  return *((__m128d*)((double*)&x+1));

}

$ gcc s.c -mavx2 -S -O2

s.c: In function 'f':

s.c:4:3: internal compiler error: in simplify_subreg, at simplify-rtx.c:5688

   return *((__m128d*)((double*)&x+1));

   ^

0x9052f6 simplify_subreg(machine_mode, rtx_def*, machine_mode, unsigned int)

    /data/repos/gcc/pristine/gcc/simplify-rtx.c:5688

0x90b8bd simplify_gen_subreg(machine_mode, rtx_def*, machine_mode, unsigned

int)

    /data/repos/gcc/pristine/gcc/simplify-rtx.c:5903

0x6ec7e8 extract_bit_field_1

    /data/repos/gcc/pristine/gcc/expmed.c:1482

0x6ecda3 extract_bit_field(rtx_def*, unsigned long, unsigned long, int, bool,

rtx_def*, machine_mode, machine_mode)

    /data/repos/gcc/pristine/gcc/expmed.c:1711

0x6fa77e expand_expr_real_1(tree_node*, rtx_def*, machine_mode,

expand_modifier, rtx_def**)

    /data/repos/gcc/pristine/gcc/expr.c:10006

0x6fb505 expand_expr

    /data/repos/gcc/pristine/gcc/expr.h:444

0x6fb505 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,

expand_modifier, rtx_def**)

    /data/repos/gcc/pristine/gcc/expr.c:9614

0x6fb623 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,

expand_modifier, rtx_def**)

    /data/repos/gcc/pristine/gcc/expr.c:9179

0x9152a8 expand_expr

    /data/repos/gcc/pristine/gcc/expr.h:444

0x9152a8 expand_return(tree_node*)

    /data/repos/gcc/pristine/gcc/stmt.c:1546

0x635273 expand_gimple_stmt_1

    /data/repos/gcc/pristine/gcc/cfgexpand.c:2082

0x635273 expand_gimple_stmt

    /data/repos/gcc/pristine/gcc/cfgexpand.c:2204

0x636c82 expand_gimple_basic_block

    /data/repos/gcc/pristine/gcc/cfgexpand.c:3978

0x639aee gimple_expand_cfg

    /data/repos/gcc/pristine/gcc/cfgexpand.c:4497

Reply via email to