[Bug tree-optimization/95295] g++ produces incorrect code with -O3 for loops

2020-06-06 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95295

Shubham Narlawar  changed:

   What|Removed |Added

 CC||gsocshubham at gmail dot com

--- Comment #9 from Shubham Narlawar  ---

I found the ICE - "internal compiler error: in hoist_memory_references, at
tree-ssa-loop-im.c:2615" with below testcase when compiled with -Og on trunk.
The testcase is obtained by fuzzing function attributes in Csmith - 


--Testcase---

a, b, c, d, f;
**e;
g() __attribute__((optimize("Ofast")));
g(h) {
  int *i = 
  for (; f;) {
c = 5;
for (; c; c--) {
  char *j = 
  **e = (h && d) == a;
  *i = 0;
  *j = 0;
}
  }
}

-


I see above ICE has been fixed now.

[Bug fortran/93522] New: f951: internal compiler error: in gfc_release_symbol, at fortran/symbol.c:3121

2020-01-30 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93522

Bug ID: 93522
   Summary: f951: internal compiler error: in gfc_release_symbol,
at fortran/symbol.c:3121
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gsocshubham at gmail dot com
  Target Milestone: ---

Testcase run on godbolt compiler x86-64 gfortran (trunk) - 

---Testcase

program rank_new
implicit none
integer :: some_var_assumed
integer, DIMENSION(3,2,1) :: array
PRINT *, RANK(array)
   call CALL_ME(array)
   contains
!No error expected
  subroutine CALL_ME23(x)
implicit none
integer:: x(..), a=10,b=20
integer, dimension(10) :: arr = (/1,2,3,4,5/)
select rank(arr(1:3))
RANK(1)
print *, "1"
 rank(2)
print *, "2"
end select
end subroutine
end program

Output (ICE)

./example.f90:12:45:


   12 | integer, dimension(10) :: arr = (/1,2,3,4,5/)

  | 1

Error: Different shape for array assignment at (1) on dimension 1 (10 and 5)

f951: internal compiler error: in gfc_release_symbol, at fortran/symbol.c:3121

Please submit a full bug report,

with preprocessed source if appropriate.

See <https://gcc.gnu.org/bugs/> for instructions.

[Bug fortran/92639] New: Error: Integer too big for its kind at (1)

2019-11-23 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92639

Bug ID: 92639
   Summary: Error: Integer too big for its kind at (1)
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gsocshubham at gmail dot com
  Target Milestone: ---

For below testcase, I ran on godbolt.org GFORTRAN trunk. Here are some
observations - 

gfortran throws an error for BGE intrinsic when the value of one of parameter
is -2147483648 which should not be according to permissible range of BGE, the
maximum range for default kind is (-2147483648, 2147483647)

derived as -2^31 to 2^31 - 1

whereas x86-64 ifort 19.0.0 (Intel's fortran compiler) gives output without
error.


TESTCASE---

subroutine print_pass_fail(expected, actual)
implicit none
  logical :: actual, expected
   if ( actual .eqv. expected )then
print *, "PASS"
   else
print *, "FAIL"
end if
end subroutine print_pass_fail
program bge_test_base
  implicit none
  logical :: index
  index = BGE(127, -2147483648);
  !print *, index
  call print_pass_fail (.true.,index)
end program

[Bug fortran/92629] New: internal compiler error: in convert_mpz_to_unsigned, at fortran/simplify.c:173

2019-11-22 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92629

Bug ID: 92629
   Summary: internal compiler error: in convert_mpz_to_unsigned,
at fortran/simplify.c:173
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gsocshubham at gmail dot com
  Target Milestone: ---

For below testcase, I ran on godbolt.org GFORTRAN trunk - 


TESTCASE---

subroutine print_pass_fail(expected, actual)
implicit none
  logical :: actual, expected
   if ( actual .eqv. expected )then
print *, "PASS"
   else
print *, "FAIL"
end if
end subroutine print_pass_fail
program bge_test_base
  implicit none
  logical :: index
  index = BGE(127, 2147483648);
  !print *, index
  call print_pass_fail (.true.,index)
end program

--COMMAND LINE OPTIION USED

-fno-range-check

--TRIED ON---

X86-64 gfortran (trunk)

[Bug target/91106] internal compiler error: output_operand: invalid use of register 'frame'

2019-07-08 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91106

--- Comment #2 from Shubham Narlawar  ---
(In reply to Richard Biener from comment #1)
> Did you paste the correct reduced testcase?

Here is the original reduced test case obtained from Creduce - 

#pragma pack(1)
struct a {
  int b;
  char c
};
union {
  struct a b
} __attribute__((aligned(32), transparent_union)) d;
e() { f(d); }

I tried to fix warnings by putting semicolon, data type and function
declaration where ever required.

[Bug middle-end/91106] New: internal compiler error: output_operand: invalid use of register 'frame'

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

Bug ID: 91106
   Summary: internal compiler error: output_operand: invalid use
of register 'frame'
   Product: gcc
   Version: 10.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 46572
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46572=edit
Preprocessed code of ICE causing program "crash2.c"

---COMPILER CONFIGURATION-

Using built-in specs.
COLLECT_GCC=/home/extended_csmith/pull-martin-compiler/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-lto
--disable-bootstrap --enable-languages=c,c++,lto --no-create --no-recursion
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.0.0 20190707 (experimental) (GCC)




-COMMAND LINE USED FOR COMPILATION-

~/pull-martin-compiler/build/gcc/xgcc -B ~/pull-martin-compiler/build/gcc/ -O0
crash2.i -w
during RTL pass: final
crash2.c: In function ‘func_1’:
crash2.c:982:1: internal compiler error: output_operand: invalid use of
register 'frame'
0x90fd53 output_operand_lossage(char const*, ...)
../../gcc/gcc/final.c:3610
0x101cdd4 ix86_print_operand_address_as
../../gcc/gcc/config/i386/i386.c:13152
0x101eaff ix86_print_operand(_IO_FILE*, rtx_def*, int)
../../gcc/gcc/config/i386/i386.c:12901
0x91006c output_operand(rtx_def*, int)
../../gcc/gcc/final.c:4052
0x91093e output_asm_insn(char const*, rtx_def**)
../../gcc/gcc/final.c:3964
0x91203f final_scan_insn_1
../../gcc/gcc/final.c:3107
0x9134fb final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
../../gcc/gcc/final.c:3153
0x913649 final_1
../../gcc/gcc/final.c:2021
0x914404 rest_of_handle_final
../../gcc/gcc/final.c:4659
0x914404 execute
../../gcc/gcc/final.c:4737
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 CODE---

void f();

#pragma pack(1)
struct a {
  int b;
  char c;
};
union {
  struct a b;
} __attribute__((aligned(32), transparent_union)) d;
void e() { f(d); }

[Bug middle-end/91105] New: internal compiler error: maximum number of generated reload insns per insn achieved (90)

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

Bug ID: 91105
   Summary: internal compiler error: maximum number of generated
reload insns per insn achieved (90)
   Product: gcc
   Version: 10.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 46571
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46571=edit
Preprocessed code of ICE causing program "crash1.c"

COMPILER CONFIGURATION--

Using built-in specs.
COLLECT_GCC=./xgcc
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --enable-languages=c,c++ --enable-lto
--disable-bootstrap : (reconfigured) ../gcc/configure --enable-lto
--disable-bootstrap --enable-languages=c,c++,lto --no-create --no-recursion
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.0.0 20190707 (experimental) (GCC) 

COMMAND LINE USED FOR COMPILATION---

~/pull-martin-compiler/build/gcc/xgcc -B ~/pull-martin-compiler/build/gcc/
crash1.i -O0 -w
during RTL pass: reload
crash1.c: In function ‘func_1’:
crash1.c:1317:1: internal compiler error: maximum number of generated reload
insns per insn achieved (90)
0xadf746 lra_constraints(bool)
../../gcc/gcc/lra-constraints.c:4902
0xac711c lra(_IO_FILE*)
../../gcc/gcc/lra.c:2468
0xa7a4b9 do_reload
../../gcc/gcc/ira.c:5522
0xa7a4b9 execute
../../gcc/gcc/ira.c:5706
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--

void g();

struct a {
  short b;
  short c;
  short d;
};
union {
  struct a b;
} __attribute__((aligned(32), transparent_union)) e;
void f() { g(e); }

[Bug middle-end/91021] New: internal compiler error: Segmentation fault

2019-06-27 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91021

Bug ID: 91021
   Summary: internal compiler error: Segmentation fault
   Product: gcc
   Version: 8.3.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 46528
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46528=edit
Preprocessed code of ICE causing program "crash5.c"

COMPILER
CONFIGURATION--

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

--COMMAND LINE USED FOR
COMPILATION-

extended_csmith@gcc10:~/ice-atomic$ ~/gcc-8.3-release/build/gcc/xgcc -B
~/gcc-8.3-release/build/gcc/ crash5.i -fgnu-tm -w -O1
during GIMPLE pass: tmmemopt
crash5.c: In function ‘main’:
crash5.c:827:5: internal compiler error: Segmentation fault
0xb0d4ef crash_signal
../../gcc-8.3.0/gcc/toplev.c:325
0x7fcce61c305f ???
   
/build/glibc-yWQXbR/glibc-2.24/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xb1a3cd tm_memopt_compute_antic
../../gcc-8.3.0/gcc/trans-mem.c:3867
0xb1a3cd execute_tm_memopt
../../gcc-8.3.0/gcc/trans-mem.c:4062
0xb1a3cd execute
../../gcc-8.3.0/gcc/trans-mem.c:4100
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 CODE---

struct a {
  signed b
} d;
c, e;
static f() {
  __transaction_atomic {
for (; 0; c++)
  ;
  }
}
static g(h) {
  e = 4;
  for (; e; e--) {
struct a *i;
*i = d;
  }
}
j() {
  __transaction_atomic { g(f()); }
}

[Bug target/91001] internal compiler error: in extract_insn, at recog.c:2310

2019-06-26 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91001

--- Comment #1 from Shubham Narlawar  ---
Below is reduced test case after fixing warning.

void f();

#pragma pack(1)
struct a {
  short b;
  char c;
};
union{
  struct a c;
} __attribute__((aligned(128), transparent_union)) d;

void e() { f(d); }

[Bug c/91001] New: internal compiler error: in extract_insn, at recog.c:2310

2019-06-26 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91001

Bug ID: 91001
   Summary: internal compiler error: in extract_insn, at
recog.c:2310
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  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 46521
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46521=edit
Preprocessed code of ICE causing program "crash1.c"

---COMPILER CONFIGURATION--

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

COMMAND LINE USED FOR COMPILATION-

extended_csmith@gcc10:~$ ~/pull-martin-compiler/build/gcc/xgcc -B
~/pull-martin-compiler/build/gcc/ crash1.i -Ibug-test-csmith/csmith/runtime/ -w
-O0 --save-temps
crash1.c: In function ‘func_58’:
crash1.c:2793:1: error: unrecognizable insn:
 2793 | }
  | ^
(insn 838 837 839 29 (set (reg:DI 17 flags)
(mem/c:DI (plus:DI (reg/f:DI 77 virtual-stack-vars)
(const_int -3736 [0xf168])) [8 l_4859+104 S8 A64]))
"crash1.c":1612:37 -1
 (nil))
during RTL pass: vregs
crash1.c:2793:1: internal compiler error: in extract_insn, at recog.c:2310
0x598e50 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc/gcc/rtl-error.c:108
0x598e6f _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/gcc/rtl-error.c:116
0xbd30cb extract_insn(rtx_insn*)
../../gcc/gcc/recog.c:2310
0x9573c3 instantiate_virtual_regs_in_insn
../../gcc/gcc/function.c:1605
0x9573c3 instantiate_virtual_regs
../../gcc/gcc/function.c:1975
0x9573c3 execute
../../gcc/gcc/function.c:2024
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--

#pragma pack(1)
struct a {
  short b;
  char c
};
union {
  struct a c
} __attribute__((aligned(128), transparent_union)) d;
e() { f(d); }

[Bug c/90071] New: internal compiler error: SSA corruption

2019-04-12 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90071

Bug ID: 90071
   Summary: internal compiler error: SSA corruption
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gsocshubham at gmail dot com
CC: mliska at suse dot cz
  Target Milestone: ---
  Host: x86_64-linux-gnu
Target: x86_64-linux-gnu
 Build: x86_64-linux-gnu

Created attachment 46154
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46154=edit
Preprocessed code of program causing ICE "crash1.c"

---COMPILER CONFIGURATION-

Using built-in specs.
COLLECT_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 20190412 (experimental) (GCC)




-COMMAND LINE USED FOR COMPILATION-



~/pull-gcc-9-trunk/build/gcc/xgcc -B ~/pull-gcc-9-trunk/build/gcc/
-I../../runtime/ crash1.c -w -O1

Unable to coalesce ssa_names 571 and 568 which are marked as MUST COALESCE.
p_61_571(ab) and  p_61_568(ab)
during RTL pass: expand
crash1.c: In function ‘func_59’:
crash1.c:1696:20: internal compiler error: SSA corruption
 1696 | static struct S0 * func_59(uint16_t  p_60, uint32_t  p_61, uint16_t 
p_62)
  |^~~
0xdc07c1 fail_abnormal_edge_coalesce
../../gcc/gcc/tree-ssa-coalesce.c:1002
0xdc07c1 coalesce_partitions
../../gcc/gcc/tree-ssa-coalesce.c:1424
0xdc07c1 coalesce_ssa_name(_var_map*)
../../gcc/gcc/tree-ssa-coalesce.c:1755
0xd585ab remove_ssa_form
../../gcc/gcc/tree-outof-ssa.c:1029
0xd585ab rewrite_out_of_ssa(ssaexpand*)
../../gcc/gcc/tree-outof-ssa.c:1287
0x7f8700 execute
../../gcc/gcc/cfgexpand.c:6314
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 CODE

a;
static b;
c() {
  int d, e = &
  void *g = &
h:
  ++e;
  if (a)
  i:
goto *g;
  for (;;) {
e = 0;
if (b)
  goto i;
  }
f:
  goto *({ d || e < 0 || e >= 2; });
  
}

[Bug c/89737] New: internal compiler error: Floating point exception

2019-03-16 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89737

Bug ID: 89737
   Summary: internal compiler error: Floating point exception
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  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 45980
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45980=edit
Preprocessed code of file named "crash1.c"

COMPILER CONFIGURATION-

$ ~/gcc-9-trunk/build/gcc/xgcc -v

Using built-in specs.
COLLECT_GCC=/home/extended_csmith/gcc-9-trunk/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 20190314 (experimental) (GCC)

--COMMAND USED FOR COMPILATION

~/gcc-9-trunk/build/gcc/xgcc -B ~/gcc-9-trunk/build/gcc/ -w -O2 crash1.i
-I../../shubham/csmith-scripts/csmith/runtime/
during GIMPLE pass: profile_estimate
crash1.c: In function ‘func_2.isra.0’:
crash1.c:3857:1: internal compiler error: Floating point exception
 3857 | }
  | ^
0xca8eaf crash_signal
../../gcc/gcc/toplev.c:326
0x7fbfedb5205f ???
   
/build/glibc-yWQXbR/glibc-2.24/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x8224bd safe_scale_64bit(unsigned long, unsigned long, unsigned long, unsigned
long*)
../../gcc/gcc/profile-count.h:81
0x8224bd profile_probability::apply_scale(long, long) const
../../gcc/gcc/profile-count.h:497
0xbd99c5 set_even_probabilities
../../gcc/gcc/predict.c:893
0xbde889 combine_predictions_for_bb
../../gcc/gcc/predict.c:1239
0xbdec83 tree_estimate_probability(bool)
../../gcc/gcc/predict.c:3093
0xbdf464 execute
../../gcc/gcc/predict.c:4030
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 CODE USING CREDUCE-

a, b;
c() {
  &
  void *e = &, *g = &
f:
  __attribute__((hot)) h : __attribute__((cold)) for (; a;) goto *g;
d:
  for (; b;)
goto *e;
}

[Bug middle-end/89351] New: internal compiler error: in exact_div, at poly-int.h:2139

2019-02-14 Thread gsocshubham at gmail dot com
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=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::is_poly>::type, poly_coeff_pair_traits::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)

[Bug tree-optimization/83581] [8 Regression] ICE in expand_LOOP_VECTORIZED, at internal-fn.c:2397

2019-02-08 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83581

--- Comment #11 from Shubham Narlawar  ---
Is it ok if I send .c extension file as an attachment?

On Fri, Feb 8, 2019 at 2:42 PM  wrote:

> Attachments with a MIME type of "text/html" are not allowed on this
> installation.
>
> Shubham Narlawar wrote:
> > I have opened a new bug report for above. Here is the link.
> >
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89248
> >
> > I attached the preprocessed code of the original program in the report.
> >
> > On Fri, Feb 8, 2019 at 2:24 PM rguenth at gcc dot gnu.org <
> > gcc-bugzi...@gcc.gnu.org> wrote:
> >
> > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83581
> > >
> > > --- Comment #9 from Richard Biener  ---
> > > (In reply to Shubham Narlawar from comment #5)
> > > > I got an ICE as below on gcc-8.2 at optimization -O3 as below-
> > > >
> > > > internal compiler error: in expand_LOOP_VECTORIZED, at
> internal-fn.c:2409
> > > >
> > > > --REDUCED CODE
> > > > a;
> > > > b() {
> > > >   void *c = &
> > > >   for (;;)
> > > >   d:
> > > > if (a)
> > > >   ;
> > > > else
> > > >   a = ({ 0 < b; });
> > > > }
> > > >
> > > > Is this the same bug as above filed? If it is fixed on gcc-8.0, what
> > > causes
> > > > ICE on gcc-8.2?
> > >
> > > Please open a new bugreport, this is a new issue and should be tracked
> > > separately.  Can yuou also attach original unreduced sources since the
> > > above seems to be reduced ad-absurdum?
> > >
> > > --
> > > You are receiving this mail because:
> > > You are on the CC list for the bug.
>

[Bug tree-optimization/83581] [8 Regression] ICE in expand_LOOP_VECTORIZED, at internal-fn.c:2397

2019-02-08 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83581

--- Comment #10 from Shubham Narlawar  ---
I have opened a new bug report for above. Here is the link.

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

I attached the preprocessed code of the original program in the report.

On Fri, Feb 8, 2019 at 2:24 PM rguenth at gcc dot gnu.org <
gcc-bugzi...@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83581
>
> --- Comment #9 from Richard Biener  ---
> (In reply to Shubham Narlawar from comment #5)
> > I got an ICE as below on gcc-8.2 at optimization -O3 as below-
> >
> > internal compiler error: in expand_LOOP_VECTORIZED, at internal-fn.c:2409
> >
> > --REDUCED CODE
> > a;
> > b() {
> >   void *c = &
> >   for (;;)
> >   d:
> > if (a)
> >   ;
> > else
> >   a = ({ 0 < b; });
> > }
> >
> > Is this the same bug as above filed? If it is fixed on gcc-8.0, what
> causes
> > ICE on gcc-8.2?
>
> Please open a new bugreport, this is a new issue and should be tracked
> separately.  Can yuou also attach original unreduced sources since the
> above seems to be reduced ad-absurdum?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

[Bug tree-optimization/89248] New: internal compiler error: in expand_LOOP_VECTORIZED, at internal-fn.c:2409

2019-02-08 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89248

Bug ID: 89248
   Summary: internal compiler error: in expand_LOOP_VECTORIZED, at
internal-fn.c:2409
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  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 45642
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45642=edit
Preprocessed code of file named "work23_crash1.c"

-COMMAND LINE USED FOR COMPILATION

~/gcc-8.2/build/gcc/xgcc -B ~/gcc-8.2/build/gcc/ -w work23_crash1.c -O3
during RTL pass: expand
work23_crash1.c: In function ‘func_20.constprop’:
work23_crash1.c:975:24: internal compiler error: in expand_LOOP_VECTORIZED, at
internal-fn.c:2409
 static int8_t * const  func_20(uint32_t  p_21, int8_t * p_22, struct S0  p_23,
int8_t * p_24)
^~~
0x92d027 expand_LOOP_VECTORIZED
../../gcc-8.2.0/gcc/internal-fn.c:2409
0x76e107 expand_call_stmt
../../gcc-8.2.0/gcc/cfgexpand.c:2598
0x76e107 expand_gimple_stmt_1
../../gcc-8.2.0/gcc/cfgexpand.c:3624
0x76e107 expand_gimple_stmt
../../gcc-8.2.0/gcc/cfgexpand.c:3790
0x76f74d expand_gimple_basic_block
../../gcc-8.2.0/gcc/cfgexpand.c:5819
0x774bd6 execute
../../gcc-8.2.0/gcc/cfgexpand.c:6425
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 CODE---

a;
b() {
  void *c = &
  for (;;)
  d:
if (a)
  ;
else
  a = ({ 0 < b; });
}


-COMPILER BUILD OPTION-

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

[Bug tree-optimization/83581] [8 Regression] ICE in expand_LOOP_VECTORIZED, at internal-fn.c:2397

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

--- Comment #6 from Shubham Narlawar  ---
Created attachment 45637
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45637=edit
Preprocessed code of file named "work23_crash1.c"

internal compiler error: in expand_LOOP_VECTORIZED, at internal-fn.c:2409


--COMPILE OPTIONS
gcc -w work23_crash1.c.orig -O3 



Target: x86_64-pc-linux-gnu
Configured with: ../gcc-8.2.0/configure --enable-languages=c,c++ --enable-lto
--disable-bootstrap
Thread model: posix
gcc version 8.2.0 (GCC)

[Bug tree-optimization/83581] [8 Regression] ICE in expand_LOOP_VECTORIZED, at internal-fn.c:2397

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

Shubham Narlawar  changed:

   What|Removed |Added

 CC||gsocshubham at gmail dot com

--- Comment #5 from Shubham Narlawar  ---
I got an ICE as below on gcc-8.2 at optimization -O3 as below- 

internal compiler error: in expand_LOOP_VECTORIZED, at internal-fn.c:2409

--REDUCED CODE
a;
b() {
  void *c = &
  for (;;)
  d:
if (a)
  ;
else
  a = ({ 0 < b; });
}

Is this the same bug as above filed? If it is fixed on gcc-8.0, what causes ICE
on gcc-8.2?

[Bug c/89153] New: internal compiler error: in assign_stack_local_1, at function.c:409

2019-02-01 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89153

Bug ID: 89153
   Summary: internal compiler error: in assign_stack_local_1, at
function.c:409
   Product: gcc
   Version: 6.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  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 45591
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45591=edit
Preprocessed code of file named "work4_crash.c"

$ gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18+deb9u1'
--with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-6 --program-prefix=x86_64-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 --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--with-target-system-zlib --enable-objc-gc=auto --enable-multiarch
--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix

gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)

-
COMMAND USED FOR COMPILATION

gcc -O1 work4_crash.c -w
work4_crash.c: In function ‘func_6’:
work4_crash.c:754:1: internal compiler error: in assign_stack_local_1, at
function.c:409
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


-

REDUCED FILE USING CREDUCE

#include "csmith.h"
a, b, d, e;
__int128 c;
f[][1][1];
g(h, i) {
  int32_t j;
  int32_t k[5];
  for (;;)
for (; a;) {
  for (j = 4; j; j--)
if (!h <
safe_mul_func_int8_t_s_s(
safe_mod_func_uint16_t_u_u(safe_sub_func_int16_t_s_s(k, j),
51),
7)) {
  uint32_t l[] = {l};
  f[0][0][j] = k[j];
  if (i)
d = 0;
}
  c = 0;
  for (; c >= 0; c--) {
int16_t *m;
*m = safe_lshift_func_int8_t_s_s(g != 6026818794, e);
  }
  b = 0;
}

[Bug tree-optimization/89135] [7/8/9 Regression] internal compiler error: in gimple_split_edge, at tree-cfg.c:2747

2019-01-31 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89135

--- Comment #3 from Shubham Narlawar  ---
I could reproduce the ICE on gcc-8.2 but not on trunk.

[Bug tree-optimization/89135] New: internal compiler error: in gimple_split_edge, at tree-cfg.c:2747

2019-01-30 Thread gsocshubham at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89135

Bug ID: 89135
   Summary: internal compiler error: in gimple_split_edge, at
tree-cfg.c:2747
   Product: gcc
   Version: 6.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  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 45572
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45572=edit
Preprocessed code of file named "work11_crash.c"

$ gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18+deb9u1'
--with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-6 --program-prefix=x86_64-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 --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--with-target-system-zlib --enable-objc-gc=auto --enable-multiarch
--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix

gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)



-
COMMAND USED FOR COMPILATION

$ gcc -O1 work11_crash.c -w
work11_crash.c: In function ‘func_12’:
work11_crash.c:355:17: internal compiler error: in gimple_split_edge, at
tree-cfg.c:2747
 static int32_t  func_12(uint64_t  p_13, uint64_t  p_14, uint32_t  p_15)
 ^~~
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

-

REDUCED FILE USING CREDUCE

#include "csmith.h"
a, b, c, d, e;
f() {
  &
  int32_t h;
  if (h) {
int64_t **i = 
b = 0;
for (; b >= 0;)
  ;
  g:
**i = 0;
uint64_t *j = 
*j = safe_rshift_func_uint8_t_u_s(0, 5);
if (c)
  goto *d;
  }
  goto *e;
}

--