[Bug middle-end/87118] ICE in expand_expr_addr_expr_1, at expr.c:7862

2019-02-07 Thread gsocsameeran at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87118

--- Comment #3 from Sameeran Joshi  ---
comfirmed on gcc-9.0

Currently, I tested on gcc-9.0, I could reproduce the same there.

I found the crash function name differs this time, from the previous function
name, whereas the backtrack remains the same, So is this same bug?


 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);
  |  ~^~~

[Bug tree-optimization/89223] New: internal compiler error: in int_cst_value, at tree.c:11226

2019-02-06 Thread gsocsameeran at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89223

Bug ID: 89223
   Summary: internal compiler error: in int_cst_value, at
tree.c:11226
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gsocsameeran at gmail dot com
  Target Milestone: ---
  Host: x86_64-linux-gnu
Target: x86_64-linux-gnu
 Build: x86_64-linux-gnu

Created attachment 45620
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45620&action=edit
Preprocessed code of file named "crash1.c"

--BACKTRACK-

during GIMPLE pass: pcom
crash1.c: In function ‘func_13.constprop’:
crash1.c:701:24: internal compiler error: in int_cst_value, at tree.c:11730
  701 | static const int32_t * func_13(int32_t * p_14)
  |^~~
0x1fa2edc int_cst_value(tree_node const*)
../../gcc/tree.c:11730
0x31bd717 initialize_matrix_A
../../gcc/tree-data-ref.c:3194
0x31bf66d analyze_subscript_affine_affine
../../gcc/tree-data-ref.c:3614
0x31c15ff analyze_siv_subscript
../../gcc/tree-data-ref.c:3925
0x31c2b16 analyze_overlapping_iterations
../../gcc/tree-data-ref.c:4171
0x31c4e49 subscript_dependence_tester_1
../../gcc/tree-data-ref.c:4713
0x31c5074 subscript_dependence_tester
../../gcc/tree-data-ref.c:4760
0x31c54c9 compute_affine_dependence(data_dependence_relation*, loop*)
../../gcc/tree-data-ref.c:4819
0x31c5a3f compute_all_dependences(vec, vec*, vec, bool)
../../gcc/tree-data-ref.c:4886
0x31c7daf compute_data_dependences_for_loop(loop*, bool, vec*, vec*,
vec*)
../../gcc/tree-data-ref.c:5360
0x1a465ac tree_predictive_commoning_loop
../../gcc/tree-predcom.c:3191
0x1a47190 tree_predictive_commoning()
../../gcc/tree-predcom.c:3313
0x1a472eb run_tree_predictive_commoning
../../gcc/tree-predcom.c:3338
0x1a473b7 execute
../../gcc/tree-predcom.c:3367


---COMMMAND LINE
~/again_build/bin/current-gcc -O3 -fgnu-tm crash1.c -I../../runtime/ -w

GCC VERSION--
current-gcc (GCC) 9.0.0 20190108 (experimental)


--PREVIOUS REPORTING---

https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&cf_known_to_fail_type=allwords&cf_known_to_work_type=allwords&list_id=228813&query_format=advanced&short_desc=internal%20compiler%20error%3A%20in%20int_cst_value&short_desc_type=allwordssubstr

---REDUCED TEST CASE 

a[5];
unsigned __int128 b;
c() {
  b = 4;
  for (;; b--)
a[b] = ({ a[b + b]; });
}

Previous reporting were on older version and reduced test case were different.
So I filed a new bug because it fails on the trunk.

[Bug c/87118] New: ICE in expand_expr_addr_expr_1, at expr.c:7862

2018-08-27 Thread gsocsameeran at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87118

Bug ID: 87118
   Summary: ICE in expand_expr_addr_expr_1, at expr.c:7862
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gsocsameeran at gmail dot com
  Target Milestone: ---
  Host: i686-linux-gnu
Target: i686-linux-gnu
 Build: i686-pc-linux-gnu

Created attachment 44612
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44612&action=edit
.ii file attached

gcc version
---
swamimauli@swamimauli:~/upload/csmith/runtime/del$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/7/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
7.2.0-8ubuntu3.2' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-7
--program-prefix=i686-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie
--with-system-zlib --with-target-system-zlib --enable-objc-gc=auto
--enable-targets=all --enable-multiarch --disable-werror --with-arch-32=i686
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu
--target=i686-linux-gnu
Thread model: posix
gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2) 
swamimauli@swamimauli:~/upload/csmith/runtime/del$ 


  compiling command
---
Below is command line:
OPTIONS :-fgnu-tm for transactional memory extension

swamimauli@swamimauli:~/upload/csmith/runtime/del$ gcc -fgnu-tm testcase.c
testcase.c: In function ‘func_9’:
testcase.c:471:139: warning: comparison of distinct pointer types lacks a cast
 nc_14(func_18(p_11), ((safe_div_func_uint8_t_u_u(((g_406.f5 &= (l_538[0][1] >
((safe_sub_func_uint64_t_u_u(p_11, ((g_541 == ((*l_546) = g_545)) , (p_11 ,
(-3L) != (safe_div_func_uint8_t_u_u(((*l_558) =
((safe_add_func_int32_t_s_s((safe_lshift_func_uint8_t_u_u(safe_mul_func_uint8_t_u_u(((safe_lshift_func_uint8_t_u_sg_100.f4
|| 65531UL) , (-8L)) & p_11), 3)) < 0xC625L), l_557)) , 0xEF867843L) , l_557)
!= p_11), 6)), g_133[0][1].f5)) == 0x3EADAD52L)), l_538[0][1]) ==
g_212[0][4]), (**g_391))) , (void*)0), g_3);
   
  ^~
testcase.c: In function ‘func_14’:
testcase.c:618:468: warning: comparison of distinct pointer types lacks a cast
 func_int16_t_s_s(6L, (1UL & l_703[7]))), g_531.f5)) <= 0x5EL), l_644)),
(*l_662) | 0x9C1A534825D755BFLL) , (*g_541)) != l_704[2][0][1]) ==
l_629)));
   
  ^~
testcase.c:685:260: warning: comparison of distinct pointer types lacks a cast
 nt32_t_u_u(p_17, (-6L), ((g_751 != ((l_752 != (**p_15)) != (l_753 =
l_652[3]))) < (safe_div_func_uint16_t_u_u((l_756 != l_757), 0x0ABFL) !=
p_17));
   
  ^~
testcase.c: In function ‘func_33’:
testcase.c:859:139: internal compiler error: in expand_expr_addr_expr_1, at
expr.c:7862
 (*l_126) = 4294967295UL) == (*l_128) = &g_102) != l_130) ,
((g_133[0][1] , l_134) != (p_36 != (void*)0))) > g_100.f3)) & ((void*)0 ==
l_135)) || 0xAC466B2A51B1567ELL) > g_56.f0);
   
 ~^~~
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
swamimauli@swamimauli:~/upload/csmith/runtime/del$ 


   reduced file
-

REDUCED TESTCACE :
#include "csmith.h"
struct {
  unsigned : 7;
  unsigned a : 3
} b[][1];
c() {
  __transaction_relaxed { safe_rshift_func_int16_t_s_u(0, b[0][1].a); }
}


 backtrack report
--
This is the full backtrace of the ICE:
bug.c: In function ‘func_33’:
bug.c:857:139: internal compiler error: in exact_div, at poly-int.h:2139
0x89a47f poly_int<1u, poly_result::is_poly