https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89351

            Bug ID: 89351
           Summary: internal compiler error: in exact_div, at
                    poly-int.h:2139
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gsocshubham at gmail dot com
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: x86_64-linux-gnu
             Build: x86_64-linux-gnu

Created attachment 45722
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45722&action=edit
Preprocessed code of file named "sam.c" which caused internal compiler error

-----------------------COMMAND USED FOR COMPILATION---------------------------

~/gcc-9-trunk/build/gcc/xgcc -B ~/gcc-9-trunk/build/gcc/ sam.c -fgnu-tm -w
-Icsmith-crash-test/csmith/runtime/
during RTL pass: expand
sam.c: In function ‘func_33’:
sam.c:857:139: internal compiler error: in exact_div, at poly-int.h:2139
  857 | != l_130) , ((g_133[0][1] , l_134) != (p_36 != (void*)0))) > g_100.f3))
& ((void*)0 == l_135)) || 0xAC466B2A51B1567ELL) > g_56.f0);
      |                                                              ~~~~~^~~

0x92f6f8 poly_int<1u, poly_result<long, if_nonpoly<int, int,
poly_int_traits<int>::is_poly>::type, poly_coeff_pair_traits<long,
if_nonpoly<int, int, poly_int_traits<int>::is_poly>::type>::result_kind>::type>
exact_div<1u, long, int>(poly_int_pod<1u, long> const&, int)
        ../../gcc/gcc/poly-int.h:2139
0x92f6f8 expand_expr_addr_expr_1
        ../../gcc/gcc/expr.c:8041
0x9220ed expand_expr_addr_expr
        ../../gcc/gcc/expr.c:8082
0x9220ed expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/gcc/expr.c:11237
0x7dfb37 expand_normal
        ../../gcc/gcc/expr.h:285
0x7dfb37 precompute_register_parameters
        ../../gcc/gcc/calls.c:967
0x7dfb37 expand_call(tree_node*, rtx_def*, int)
        ../../gcc/gcc/calls.c:3998
0x7ccc0d expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
        ../../gcc/gcc/builtins.c:8337
0x921918 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/gcc/expr.c:11005
0x92fb14 store_expr(tree_node*, rtx_def*, int, bool, bool)
        ../../gcc/gcc/expr.c:5649
0x93194e expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc/gcc/expr.c:5432
0x7f4076 expand_call_stmt
        ../../gcc/gcc/cfgexpand.c:2722
0x7f4076 expand_gimple_stmt_1
        ../../gcc/gcc/cfgexpand.c:3691
0x7f4076 expand_gimple_stmt
        ../../gcc/gcc/cfgexpand.c:3850
0x7f6ef5 expand_gimple_basic_block
        ../../gcc/gcc/cfgexpand.c:5886
0x7fd1e6 execute
        ../../gcc/gcc/cfgexpand.c:6509
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

-----------------------REDUCED TEST CASE-------------------------------------

struct {
  signed : 5;
  unsigned b : 7
} c[][1];
a() {}
d() {
  __transaction_relaxed { a(c[0][1].b); }
}

----------------------COMPILER BUILD OPTIONS---------------------------------

Using built-in specs.
COLLECT_GCC=build/gcc/xgcc
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --enable-languages=c,c++ --enable-lto
--disable-bootstrap : (reconfigured) ../gcc/configure --enable-languages=c,c++
--enable-lto --disable-bootstrap
Thread model: posix
gcc version 9.0.1 20190214 (experimental) (GCC)

Reply via email to