[Bug target/113805] New: [aarch64][sme2] ICE in extract_insn, at recog.cc:2812 with r14-6178-g8d29b7aca15133

2024-02-07 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113805

Bug ID: 113805
   Summary: [aarch64][sme2] ICE in extract_insn, at recog.cc:2812
with r14-6178-g8d29b7aca15133
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: rsandifo at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64

Compiling reduced testcase gcc.target/aarch64/sme/zt0_state_5.c results in ICE
since it was introduced in r14-6178-g8d29b7aca15133.

$ cat zt0_state_5.c
#pragma GCC target "+sme2"
void in_zt0() __arm_in("zt0");
__arm_new("zt0") void test12() { in_zt0(); }


$ aarch64-linux-gnu-gcc zt0_state_5.c -mtrack-speculation
zt0_state_5.c: In function ‘test12’:
zt0_state_5.c:3:44: error: unrecognizable insn:
3 | __arm_new("zt0") void test12() { in_zt0(); }
  |^
(jump_insn 36 12 37 (set (pc)
(if_then_else (eq (reg:DI 0 x0 [100])
(const_int 0 [0]))
(label_ref 40)
(pc))) "zt0_state_5.c":3:34 -1
 (nil)
 -> 40)
during RTL pass: split5
zt0_state_5.c:3:44: internal compiler error: in extract_insn, at recog.cc:2812
0x16f1c94 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/mjires/git/GCC/master/gcc/rtl-error.cc:108
0x16f1cd5 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/mjires/git/GCC/master/gcc/rtl-error.cc:116
0x16a27f6 extract_insn(rtx_insn*)
/home/mjires/git/GCC/master/gcc/recog.cc:2812
0x16a24b5 extract_insn_cached(rtx_insn*)
/home/mjires/git/GCC/master/gcc/recog.cc:2701
0x120209c cleanup_subreg_operands(rtx_insn*)
/home/mjires/git/GCC/master/gcc/final.cc:3053
0x16a3fd2 split_insn
/home/mjires/git/GCC/master/gcc/recog.cc:3441
0x16a42b6 split_all_insns_noflow()
/home/mjires/git/GCC/master/gcc/recog.cc:3567
0x16a62f4 execute
/home/mjires/git/GCC/master/gcc/recog.cc:4641
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.1/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking : (reconfigured)
/home/mjires/git/GCC/master/configure --prefix=/home/mjires/built/master
--target=aarch64-linux-gnu --disable-bootstrap --enable-languages=c,c++,fortran
--disable-multilib --disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240207 (experimental) (GCC)

[Bug target/113790] New: [14 Regression][riscv64] ICE in curr_insn_transform, at lra-constraints.cc:4294 since r14-4944-gf55cdce3f8dd85

2024-02-06 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113790

Bug ID: 113790
   Summary: [14 Regression][riscv64] ICE in curr_insn_transform,
at lra-constraints.cc:4294 since
r14-4944-gf55cdce3f8dd85
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: vmakarov at redhat dot com
  Target Milestone: ---
Target: riscv64

Compiling testcase gcc.c-torture/compile/20120727-2.c results in ICE since
r14-4944-gf55cdce3f8dd85.

$ cat 20120727-2.c
/* { dg-options "-mfpmath=387" { target { i?86-*-* x86_64-*-* } } } */

union {
  char *p;
  double d;
} u;

void
f (void)
{
  u.p = "";
  u.d += 1.1;
}


$ riscv64-linux-gnu-gcc 20120727-2.c -mno-explicit-relocs
-fno-omit-frame-pointer -Oz
20120727-2.c: In function ‘f’:
20120727-2.c:13:1: error: unable to generate reloads for:
   13 | }
  | ^
(insn 20 19 21 2 (set (mem/c:DI (plus:DI (reg/f:DI 65 frame)
(const_int -24 [0xffe8])) [4 %sfp+-8 S8 A64])
(reg:DI 143 [142])) "20120727-2.c":12:7 208 {*movdi_64bit}
 (expr_list:REG_DEAD (reg:DI 143 [142])
(nil)))
during RTL pass: reload
20120727-2.c:13:1: internal compiler error: in curr_insn_transform, at
lra-constraints.cc:4234
0x19851c4 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/mjires/git/GCC/master/gcc/rtl-error.cc:108
0x1785645 curr_insn_transform
/home/mjires/git/GCC/master/gcc/lra-constraints.cc:4234
0x17898ab lra_constraints(bool)
/home/mjires/git/GCC/master/gcc/lra-constraints.cc:5432
0x17722e0 lra(_IO_FILE*, int)
/home/mjires/git/GCC/master/gcc/lra.cc:2442
0x171b25b do_reload
/home/mjires/git/GCC/master/gcc/ira.cc:5973
0x171b73c execute
/home/mjires/git/GCC/master/gcc/ira.cc:6161
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ riscv64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=riscv64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/riscv64-linux-gnu/14.0.1/lto-wrapper
Target: riscv64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=riscv64-linux-gnu
--disable-bootstrap --enable-languages=c,c++ --disable-multilib
--disable-libsanitizer --enable-checking : (reconfigured)
/home/mjires/git/GCC/master/configure --prefix=/home/mjires/built/master
--target=riscv64-linux-gnu --disable-bootstrap --disable-multilib
--disable-libsanitizer --enable-checking target_alias=riscv64-linux-gnu
--enable-languages=c,c++,lto --no-create --no-recursion
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240206 (experimental) (GCC)

[Bug tree-optimization/113681] New: [14 Regression] ICE in tree_profiling, at tree-profile.cc:803 since r14-6201-gf0a90c7d7333fc

2024-01-31 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113681

Bug ID: 113681
   Summary: [14 Regression] ICE in tree_profiling, at
tree-profile.cc:803 since r14-6201-gf0a90c7d7333fc
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: aoliva at gcc dot gnu.org
  Target Milestone: ---

Compiling reduced testcase c-c++-common/torture/strub-inlinable2.c results in
ICE since r14-6201-gf0a90c7d7333fc which introduced this test.

$ cat strub-inlinable2.c
inline void __attribute__((strub, always_inline)) inl_int_ali() {}
void bat() { inl_int_ali(); }


$ gcc strub-inlinable2.c -fbranch-probabilities
strub-inlinable2.c:2:14: error: calling ‘always_inline’ ‘strub’ ‘inl_int_ali’
in non-‘strub’ context ‘bat’
2 | void bat() { inl_int_ali(); }
  |  ^
during IPA pass: profile
strub-inlinable2.c:2:1: internal compiler error: in tree_profiling, at
tree-profile.cc:803
2 | void bat() { inl_int_ali(); }
  | ^~~~
0x181b321 tree_profiling
/home/mjires/git/GCC/master/gcc/tree-profile.cc:803
0x181bc4c execute
/home/mjires/git/GCC/master/gcc/tree-profile.cc:990
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking : (reconfigured) /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240131 (experimental) (GCC)

[Bug tree-optimization/113659] New: [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da

2024-01-29 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113659

Bug ID: 113659
   Summary: [14 Regression] ICE Segmentation fault since
r14-8355-g02e683894942da
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: rguenther at suse dot de
  Target Milestone: ---

Compiling reduced testcase g++.dg/torture/predcom-1.C results in ICE since
r14-8355-g02e683894942da. Reintroduced PR113442.

$ cat predcom-1.C
struct Foo {
  int *ptr;
};
bool Baz(Foo first) {
  while (first.ptr)
if (*first.ptr++)
  return false;
}


$ g++ predcom-1.C -O3 -fno-tree-sra -mavx512bf16
predcom-1.C: In function ‘bool Baz(Foo)’:
predcom-1.C:8:1: warning: control reaches end of non-void function
[-Wreturn-type]
8 | }
  | ^
during GIMPLE pass: vect
predcom-1.C:4:6: internal compiler error: Segmentation fault
4 | bool Baz(Foo first) {
  |  ^~~
0x1b06530 crash_signal
/home/mjires/git/GCC/master/gcc/toplev.cc:317
0x13c5e6a gimple_phi_result(gphi const*)
/home/mjires/git/GCC/master/gcc/gimple.h:4608
0x1e6a0a4 slpeel_tree_duplicate_loop_to_edge_cfg(loop*, edge_def*, loop*,
edge_def*, edge_def*, edge_def**, bool, vec*)
/home/mjires/git/GCC/master/gcc/tree-vect-loop-manip.cc:1713
0x1e6f49e vect_do_peeling(_loop_vec_info*, tree_node*, tree_node*, tree_node**,
tree_node**, tree_node**, int, bool, bool, tree_node**)
/home/mjires/git/GCC/master/gcc/tree-vect-loop-manip.cc:3395
0x1e597a8 vect_transform_loop(_loop_vec_info*, gimple*)
/home/mjires/git/GCC/master/gcc/tree-vect-loop.cc:11914
0x1eb23de vect_transform_loops
/home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1006
0x1eb2b3e try_vectorize_loop_1
/home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1152
0x1eb2c77 try_vectorize_loop
/home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1182
0x1eb2f3e execute
/home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1298
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking : (reconfigured) /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240129 (experimental) (GCC)

[Bug target/113657] New: [14 Regression] ICE Segmentation fault since r14-1187-gd6b756447cd58b

2024-01-29 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113657

Bug ID: 113657
   Summary: [14 Regression] ICE Segmentation fault since
r14-1187-gd6b756447cd58b
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: aoliva at gcc dot gnu.org
  Target Milestone: ---

Compiling reduced testcase gcc.target/aarch64/pr113550.c results in ICE since
r14-1187-gd6b756447cd58b.

$ cat pr113550.c
#pragma GCC target "+ls64"
#pragma GCC aarch64 "arm_acle.h"
__arm_data512_t foo(__arm_data512_t* ptr) { return *ptr; }


$ aarch64-linux-gnu-gcc pr113550.c -mstrict-align
during RTL pass: split5
pr113550.c: In function ‘foo’:
pr113550.c:3:58: internal compiler error: Segmentation fault
3 | __arm_data512_t foo(__arm_data512_t* ptr) { return *ptr; }
  |  ^
0x178f9de crash_signal
/home/mjires/git/GCC/master/gcc/toplev.cc:317
0x16f7566 reg_overlap_mentioned_p(rtx_def const*, rtx_def const*)
/home/mjires/git/GCC/master/gcc/rtlanal.cc:1857
0x267687e gen_split_300(rtx_insn*, rtx_def**)
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-simd.md:8232
0x2a7ffb2 split_71
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-simd.md:8212
0x2a99edf split_131
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64.md:875
0x2a9dcf4 split_insns(rtx_def*, rtx_insn*)
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-sve.md:10993
0x117c8db try_split(rtx_def*, rtx_insn*, int)
/home/mjires/git/GCC/master/gcc/emit-rtl.cc:3941
0x16a3a44 split_insn
/home/mjires/git/GCC/master/gcc/recog.cc:3405
0x16a3ea6 split_all_insns_noflow()
/home/mjires/git/GCC/master/gcc/recog.cc:3567
0x16a5ee4 execute
/home/mjires/git/GCC/master/gcc/recog.cc:4641
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.1/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking : (reconfigured)
/home/mjires/git/GCC/master/configure --prefix=/home/mjires/built/master
--target=aarch64-linux-gnu --disable-bootstrap --enable-languages=c,c++,fortran
--disable-multilib --disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240129 (experimental) (GCC)

[Bug target/113656] New: [x86] ICE in simplify_const_unary_operation, at simplify-rtx.cc:1954 with new -mavx10.1

2024-01-29 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113656

Bug ID: 113656
   Summary: [x86] ICE in simplify_const_unary_operation, at
simplify-rtx.cc:1954 with new -mavx10.1
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: haochen.jiang at intel dot com
  Target Milestone: ---
Target: x86_64-pc-linux-gnu

Compiling reduced testcase gcc.target/i386/avx512fp16-broadcast-2.c results in
ICE. Bisected to initial AVX10.1 patch r14-5607-g2f8f7ee2db82a3.

$ cat avx512fp16-broadcast-2.c
_Float16 test_256_src[8];
void test_256() {
  for (int i = 0; i < 8; i++)
test_256_src[i] = i - 8.4;
}


$ gcc avx512fp16-broadcast-2.c -frounding-math -O3 -mavx10.1
-funsafe-math-optimizations
during RTL pass: combine
avx512fp16-broadcast-2.c: In function ‘test_256’:
avx512fp16-broadcast-2.c:5:1: internal compiler error: in
simplify_const_unary_operation, at simplify-rtx.cc:1954
5 | }
  | ^
0x169ccd4 simplify_const_unary_operation(rtx_code, machine_mode, rtx_def*,
machine_mode)
/home/mjires/git/GCC/master/gcc/simplify-rtx.cc:1954
0x1698783 simplify_context::simplify_unary_operation(rtx_code, machine_mode,
rtx_def*, machine_mode)
/home/mjires/git/GCC/master/gcc/simplify-rtx.cc:889
0x1696b93 simplify_context::simplify_gen_unary(rtx_code, machine_mode,
rtx_def*, machine_mode)
/home/mjires/git/GCC/master/gcc/simplify-rtx.cc:360
0x169a0bb simplify_context::simplify_unary_operation_1(rtx_code, machine_mode,
rtx_def*)
/home/mjires/git/GCC/master/gcc/simplify-rtx.cc:1304
0x16987aa simplify_context::simplify_unary_operation(rtx_code, machine_mode,
rtx_def*, machine_mode)
/home/mjires/git/GCC/master/gcc/simplify-rtx.cc:893
0x101ade9 simplify_unary_operation(rtx_code, machine_mode, rtx_def*,
machine_mode)
/home/mjires/git/GCC/master/gcc/rtl.h:3486
0x2e56f58 combine_simplify_rtx
/home/mjires/git/GCC/master/gcc/combine.cc:5690
0x2e56c13 subst
/home/mjires/git/GCC/master/gcc/combine.cc:5609
0x2e56946 subst
/home/mjires/git/GCC/master/gcc/combine.cc:5536
0x2e56946 subst
/home/mjires/git/GCC/master/gcc/combine.cc:5536
0x2e4f6f1 try_combine
/home/mjires/git/GCC/master/gcc/combine.cc:3302
0x2e49be5 combine_instructions
/home/mjires/git/GCC/master/gcc/combine.cc:1264
0x2e71cf2 rest_of_handle_combine
/home/mjires/git/GCC/master/gcc/combine.cc:15091
0x2e71dae execute
/home/mjires/git/GCC/master/gcc/combine.cc:15135
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking : (reconfigured) /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240129 (experimental) (GCC)

[Bug tree-optimization/113442] New: [14 Regression] ICE in compute_live_loop_exits, at tree-ssa-loop-manip.cc:250 since r14-7195-g411de96dbf2bda

2024-01-17 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113442

Bug ID: 113442
   Summary: [14 Regression] ICE in compute_live_loop_exits, at
tree-ssa-loop-manip.cc:250 since
r14-7195-g411de96dbf2bda
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: tamar.christina at arm dot com
  Target Milestone: ---

Compiling reduced testcase g++.dg/torture/predcom-1.C results in ICE since
r14-7195-g411de96dbf2bda.

$ cat predcom-1.C
struct Foo {
  int *ptr;
};
bool Baz(Foo first) {
  while (first.ptr)
if (*first.ptr++)
  return false;
}


$ g++ predcom-1.C -fno-tree-sra -O3 -mavx512bf16
predcom-1.C: In function ‘bool Baz(Foo)’:
predcom-1.C:8:1: warning: control reaches end of non-void function
[-Wreturn-type]
8 | }
  | ^
during GIMPLE pass: vect
predcom-1.C:4:6: internal compiler error: in compute_live_loop_exits, at
tree-ssa-loop-manip.cc:250
4 | bool Baz(Foo first) {
  |  ^~~
0x1cf88f5 compute_live_loop_exits
/home/mjires/git/GCC/master/gcc/tree-ssa-loop-manip.cc:250
0x1cf8cf1 add_exit_phis_var
/home/mjires/git/GCC/master/gcc/tree-ssa-loop-manip.cc:332
0x1cf90b4 add_exit_phis
/home/mjires/git/GCC/master/gcc/tree-ssa-loop-manip.cc:392
0x1cf970a rewrite_into_loop_closed_ssa_1
/home/mjires/git/GCC/master/gcc/tree-ssa-loop-manip.cc:606
0x1cf977b rewrite_into_loop_closed_ssa(bitmap_head*, unsigned int)
/home/mjires/git/GCC/master/gcc/tree-ssa-loop-manip.cc:628
0x1eaec75 execute
/home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1360
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking : (reconfigured) /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240117 (experimental) (GCC)

[Bug target/113356] New: [14 Regression][aarch64] ICE in try_fuse_pair, at config/aarch64/aarch64-ldp-fusion.cc:2203 since r14-6947-g4b67ec7ff5b1aa

2024-01-12 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113356

Bug ID: 113356
   Summary: [14 Regression][aarch64] ICE in try_fuse_pair, at
config/aarch64/aarch64-ldp-fusion.cc:2203 since
r14-6947-g4b67ec7ff5b1aa
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: acoplan at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64

Compiling reduced testcase g++.dg/ipa/pr71207.C fails the assert added in
r14-6947-g4b67ec7ff5b1aa.

$ cat pr71207.C
struct Class1 {
  virtual ~Class1() {}
  unsigned Field1;
};
struct Class4 : virtual Class1 {};
int main() { Class4 var1; }


$ aarch64-linux-gnu-g++ pr71207.C -fnon-call-exceptions -mearly-ldp-fusion
-fno-lifetime-dse -fno-forward-propagate -Os
during RTL pass: ldp_fusion
pr71207.C: In destructor ‘virtual Class4::~Class4()’:
pr71207.C:5:8: internal compiler error: in try_fuse_pair, at
config/aarch64/aarch64-ldp-fusion.cc:2265
5 | struct Class4 : virtual Class1 {};
  |^~
0x2264a33 ldp_bb_info::try_fuse_pair(bool, unsigned int, rtl_ssa::insn_info*,
rtl_ssa::insn_info*)
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2265
0x2264eff ldp_bb_info::merge_pairs(std::__cxx11::list >&, std::__cxx11::list >&, bool, unsigned int)
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2389
0x2265124 ldp_bb_info::transform_for_base(int, access_group&)
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2422
0x226785e void
ldp_bb_info::traverse_base_map,
int_hash >, access_group,
simple_hashmap_traits,
int_hash > >, access_group> >
>(ordered_hash_map, int_hash >, access_group,
simple_hashmap_traits,
int_hash > >, access_group> >&)
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2481
0x2265383 ldp_bb_info::transform()
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2489
0x22604ca ldp_fusion_bb(rtl_ssa::bb_info*)
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2717
0x2260554 ldp_fusion()
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2726
0x2260666 execute
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2776
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ aarch64-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-g++
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.1/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking : (reconfigured)
/home/mjires/git/GCC/master/configure --prefix=/home/mjires/built/master
--target=aarch64-linux-gnu --disable-bootstrap --enable-languages=c,c++,fortran
--disable-multilib --disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240112 (experimental) (GCC)

[Bug target/113273] [14 Regression][x86][asan] ICE Segmentation fault since r14-6946-ge66dc37b299cac

2024-01-08 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113273

--- Comment #2 from Michal Jireš  ---
(In reply to Ilya Leoshkevich from comment #1)
> Hi, sorry about the regression.  Could you please check if
> https://inbox.sourceware.org/gcc-patches/20240108092434.554918-1-iii@linux.
> ibm.com/ fixes that for you?

Thanks, yes, that fixes all my regressed tests.

[Bug target/113273] New: [14 Regression][x86][asan] ICE Segmentation fault since r14-6946-ge66dc37b299cac

2024-01-08 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113273

Bug ID: 113273
   Summary: [14 Regression][x86][asan] ICE Segmentation fault
since r14-6946-ge66dc37b299cac
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: iii at linux dot ibm.com
  Target Milestone: ---
Target: x86

Compiling (not only) empty file results in ICE since r14-6946-ge66dc37b299cac.

$ g++ empty.cc -mfunction-return=thunk -fsanitize=address
empty.cc:1: internal compiler error: Segmentation fault
0x1af49f8 crash_signal
/home/mjires/git/GCC/master/gcc/toplev.cc:316
0x1b0fa03 asan_function_start()
/home/mjires/git/GCC/master/gcc/asan.cc:1484
0x1f4da41 assemble_function_label_raw(_IO_FILE*, char const*)
/home/mjires/git/GCC/master/gcc/varasm.cc:1849
0x1f9278a ix86_asm_output_function_label(_IO_FILE*, char const*, tree_node*)
/home/mjires/git/GCC/master/gcc/config/i386/i386.cc:1643
0x1f9f8c3 output_indirect_thunk_function
/home/mjires/git/GCC/master/gcc/config/i386/i386.cc:6208
0x1f9fa23 ix86_code_end
/home/mjires/git/GCC/master/gcc/config/i386/i386.cc:6263
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20240108 (experimental) (GCC)

[Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9

2024-01-03 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221

Bug ID: 113221
   Summary: [14 Regression][aarch64]ICE in extract_insn, at
recog.cc:2812 since r14-6605-gc0911c6b357ba9
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: acoplan at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64

Compiling reduced testcase gcc.dg/debug/pr43972.c results in ICE since
r14-6605-gc0911c6b357ba9.

$ cat pr43972.c
void bar();
void foo(int* b) {
  for (;;)
*b++ = (long)bar;
}


$ aarch64-linux-gnu-gcc pr43972.c -O1 -fno-move-loop-invariants
-funroll-all-loops
pr43972.c: In function ‘foo’:
pr43972.c:5:1: error: unrecognizable insn:
5 | }
  | ^
(insn 80 0 0 (set (reg:SI 130)
(subreg:SI (lo_sum:DI (reg/f:DI 105)
(symbol_ref:DI ("bar") [flags 0x41] )) 0)) -1
 (nil))
during RTL pass: reload
pr43972.c:5:1: internal compiler error: in extract_insn, at recog.cc:2812
0x16e9be0 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/mjires/git/GCC/master/gcc/rtl-error.cc:108
0x16e9c21 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/mjires/git/GCC/master/gcc/rtl-error.cc:116
0x169a764 extract_insn(rtx_insn*)
/home/mjires/git/GCC/master/gcc/recog.cc:2812
0x147d140 ira_remove_insn_scratches(rtx_insn*, bool, _IO_FILE*, rtx_def*
(*)(rtx_def*))
/home/mjires/git/GCC/master/gcc/ira.cc:5381
0x14d574a remove_insn_scratches
/home/mjires/git/GCC/master/gcc/lra.cc:2154
0x14d112b lra_emit_move(rtx_def*, rtx_def*)
/home/mjires/git/GCC/master/gcc/lra.cc:513
0x14eb151 curr_insn_transform
/home/mjires/git/GCC/master/gcc/lra-constraints.cc:4669
0x14ed78c lra_constraints(bool)
/home/mjires/git/GCC/master/gcc/lra-constraints.cc:5414
0x14d6064 lra(_IO_FILE*, int)
/home/mjires/git/GCC/master/gcc/lra.cc:2442
0x147e4d3 do_reload
/home/mjires/git/GCC/master/gcc/ira.cc:5973
0x147e970 execute
/home/mjires/git/GCC/master/gcc/ira.cc:6161
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking : (reconfigured)
/home/mjires/git/GCC/master/configure --prefix=/home/mjires/built/master
--target=aarch64-linux-gnu --disable-bootstrap --enable-languages=c,c++,fortran
--disable-multilib --disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20240103 (experimental) (GCC)

[Bug target/113220] New: [aarch64] ICE Segmentation fault with r14-6178-g8d29b7aca15133

2024-01-03 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113220

Bug ID: 113220
   Summary: [aarch64] ICE Segmentation fault with
r14-6178-g8d29b7aca15133
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: richard.sandiford at arm dot com
  Target Milestone: ---
Target: aarch64

Compiling reduced testcase gcc.target/aarch64/sme/zt0_state_5.c results in ICE
with r14-6178-g8d29b7aca15133.

$ cat zt0_state_5.c
#pragma GCC target "+sme2"
void inout_zt0() __arm_inout("zt0") {
  int ptr;
  ptr += 1;
}


$ aarch64-linux-gnu-gcc zt0_state_5.c -ftrapv -fstack-clash-protection
during RTL pass: mode_sw
zt0_state_5.c: In function ‘inout_zt0’:
zt0_state_5.c:5:1: internal compiler error: Segmentation fault
5 | }
  | ^
0x1787d3a crash_signal
/home/mjires/git/GCC/master/gcc/toplev.cc:316
0x16f07c8 rtx_properties::try_to_add_pattern(rtx_def const*)
/home/mjires/git/GCC/master/gcc/rtlanal.cc:2246
0x16f0d4b rtx_properties::try_to_add_insn(rtx_insn const*, bool)
/home/mjires/git/GCC/master/gcc/rtlanal.cc:2356
0x1c83f7b growing_rtx_properties::add_insn(rtx_insn
const*, bool)::{lambda()#1}::operator()() const
/home/mjires/git/GCC/master/gcc/rtlanal.h:288
0x1c866a2 void
growing_rtx_properties::repeat::add_insn(rtx_insn
const*,
bool)::{lambda()#1}>(growing_rtx_properties::add_insn(rtx_insn
const*, bool)::{lambda()#1})
/home/mjires/git/GCC/master/gcc/rtlanal.h:246
0x1c83fda growing_rtx_properties::add_insn(rtx_insn
const*, bool)
/home/mjires/git/GCC/master/gcc/rtlanal.h:288
0x1c79afe aarch64_mode_emit
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64.cc:29400
0x2b318d1 optimize_mode_switching
/home/mjires/git/GCC/master/gcc/mode-switching.cc:1210
0x2b31b7a execute
/home/mjires/git/GCC/master/gcc/mode-switching.cc:1309
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking : (reconfigured)
/home/mjires/git/GCC/master/configure --prefix=/home/mjires/built/master
--target=aarch64-linux-gnu --disable-bootstrap --enable-languages=c,c++,fortran
--disable-multilib --disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20240103 (experimental) (GCC)

[Bug target/113217] New: [14 Regression][aarch64] ICE in rtl_verify_bb_insns, at cfgrtl.cc:2796 since r14-6605-gc0911c6b357ba9

2024-01-03 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113217

Bug ID: 113217
   Summary: [14 Regression][aarch64] ICE in rtl_verify_bb_insns,
at cfgrtl.cc:2796 since r14-6605-gc0911c6b357ba9
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: acoplan at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64

Compiling reduced testcase g++.dg/vect/pr45470-b.cc results in ICE since
r14-6605-gc0911c6b357ba9.

$ cat pr45470-b.cc
struct _Vector_base {
  int _M_end_of_storage;
};
struct vector : _Vector_base {
  vector() : _Vector_base() {}
  ~vector();
};
struct LoadGraph {
  LoadGraph();
  vector colors;
  vector data_block;
};
LoadGraph::LoadGraph() {}


$ aarch64-linux-gnu-g++ pr45470-b.cc -fnon-call-exceptions
-fvar-tracking-assignments-toggle -Ofast
pr45470-b.cc: In constructor ‘LoadGraph::LoadGraph()’:
pr45470-b.cc:13:25: error: in basic block 2:
   13 | LoadGraph::LoadGraph() {}
  | ^
pr45470-b.cc:13:25: error: flow control insn inside a basic block
(insn 7 6 8 2 (set (mem:V2x4QI (reg/f:DI 103 [ this ]) [0 +0 S8 A32])
(unspec:V2x4QI [
(const_int 0 [0]) repeated x2
] UNSPEC_STP)) "pr45470-b.cc":5:27 90 {*store_pair_4}
 (expr_list:REG_EH_REGION (const_int 1 [0x1])
(nil)))
during RTL pass: ldp_fusion
pr45470-b.cc:13:25: internal compiler error: in rtl_verify_bb_insns, at
cfgrtl.cc:2802
0x1b09b2e _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/mjires/git/GCC/master/gcc/rtl-error.cc:108
0x148d06f rtl_verify_bb_insns
/home/mjires/git/GCC/master/gcc/cfgrtl.cc:2802
0x148d337 rtl_verify_flow_info_1
/home/mjires/git/GCC/master/gcc/cfgrtl.cc:2889
0x148da96 rtl_verify_flow_info
/home/mjires/git/GCC/master/gcc/cfgrtl.cc:3134
0x147202e verify_flow_info()
/home/mjires/git/GCC/master/gcc/cfghooks.cc:283
0x1a37384 execute_function_todo
/home/mjires/git/GCC/master/gcc/passes.cc:2100
0x1a35faa do_per_function
/home/mjires/git/GCC/master/gcc/passes.cc:1687
0x1a37509 execute_todo
/home/mjires/git/GCC/master/gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ aarch64-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-g++
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking : (reconfigured)
/home/mjires/git/GCC/master/configure --prefix=/home/mjires/built/master
--target=aarch64-linux-gnu --disable-bootstrap --enable-languages=c,c++,fortran
--disable-multilib --disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20240103 (experimental) (GCC)

[Bug target/113115] ICE In extract_constrain_insn_cached recog.cc with ppc64le-linux-gnu crosscompiler

2024-01-03 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113115

Michal Jireš  changed:

   What|Removed |Added

 CC||jeevitha at gcc dot gnu.org,
   ||mjires at suse dot cz

--- Comment #1 from Michal Jireš  ---
Bisected to r14-3592-g9ea1248604d7b6.

[Bug target/113094] New: [14 Regression][aarch64] ICE in extract_constrain_insn, at recog.cc:2713 since r14-6290-g9f0f7d802482a8

2023-12-20 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113094

Bug ID: 113094
   Summary: [14 Regression][aarch64] ICE in
extract_constrain_insn, at recog.cc:2713 since
r14-6290-g9f0f7d802482a8
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
  Target Milestone: ---
Target: aarch64

Compiling reduced testcase c-c++-common/torture/vector-subscript-2.c results in
ICE since r14-6290-g9f0f7d802482a8.


$ cat vector-subscript-2.c
struct TV4 {
  __attribute__((vector_size(sizeof(int) * 4))) int v;
};
void modify() {
  struct TV4 __trans_tmp_1, temp;
  temp.v[0] = temp.v[3] = 0;
  __trans_tmp_1 = temp;
}


$ aarch64-linux-gnu-gcc vector-subscript-2.c -fno-tree-dse -Ofast
-fno-tree-coalesce-vars -fno-dce -fno-tree-dce
vector-subscript-2.c: In function ‘modify’:
vector-subscript-2.c:8:1: error: insn does not satisfy its constraints:
8 | }
  | ^
(insn 18 2 13 2 (set (reg:V4SI 63 v31)
(reg:V4SI 94 virtual-incoming-args)) "vector-subscript-2.c":6:25 1270
{*aarch64_simd_movv4si}
 (nil))
during RTL pass: reload
vector-subscript-2.c:8:1: internal compiler error: in extract_constrain_insn,
at recog.cc:2713
0x16e5964 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/mjires/git/GCC/master/gcc/rtl-error.cc:108
0x16e59c4 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/mjires/git/GCC/master/gcc/rtl-error.cc:118
0x1696240 extract_constrain_insn(rtx_insn*)
/home/mjires/git/GCC/master/gcc/recog.cc:2713
0x14d253b check_rtl
/home/mjires/git/GCC/master/gcc/lra.cc:2189
0x14d3019 lra(_IO_FILE*, int)
/home/mjires/git/GCC/master/gcc/lra.cc:2610
0x147b0f5 do_reload
/home/mjires/git/GCC/master/gcc/ira.cc:5973
0x147b592 execute
/home/mjires/git/GCC/master/gcc/ira.cc:6161
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking : (reconfigured)
/home/mjires/git/GCC/master/configure --prefix=/home/mjires/built/master
--target=aarch64-linux-gnu --disable-bootstrap --enable-languages=c,c++,fortran
--disable-multilib --disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231220 (experimental) (GCC)

[Bug target/113093] New: [14 Regression][aarch64] ICE in rtl_verify_bb_insn, at cfgrtl.cc:2796 since r14-6605-gc0911c6b357ba9

2023-12-20 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113093

Bug ID: 113093
   Summary: [14 Regression][aarch64] ICE in rtl_verify_bb_insn, at
cfgrtl.cc:2796 since r14-6605-gc0911c6b357ba9
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: acoplan at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64

Compiling reduced testcase gcc.dg/compat/scalar-return-3_y.c results in ICE
since  r14-6605-gc0911c6b357ba9.

$ cat scalar-return-3_y.c
_Complex long *c;
void init() { *c = 1.0; }


$ aarch64-linux-gnu-gcc scalar-return-3_y.c -Os
-fharden-control-flow-redundancy -fnon-call-exceptions
scalar-return-3_y.c: In function ‘init’:
scalar-return-3_y.c:2:25: error: in basic block 2:
2 | void init() { *c = 1.0; }
  | ^
scalar-return-3_y.c:2:25: error: flow control insn inside a basic block
(insn 12 11 66 2 (set (mem:V2x8QI (reg/f:DI 100 [ c.0_1 ]) [0 +0 S16 A64])
(unspec:V2x8QI [
(reg:DI 109)
(const_int 0 [0])
] UNSPEC_STP)) "scalar-return-3_y.c":2:18 91 {*store_pair_8}
 (expr_list:REG_EH_REGION (const_int 1 [0x1])
(nil)))
during RTL pass: ldp_fusion
scalar-return-3_y.c:2:25: internal compiler error: in rtl_verify_bb_insns, at
cfgrtl.cc:2802
0x16e5db4 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/mjires/git/GCC/master/gcc/rtl-error.cc:108
0x105e9d6 rtl_verify_bb_insns
/home/mjires/git/GCC/master/gcc/cfgrtl.cc:2802
0x105ec9e rtl_verify_flow_info_1
/home/mjires/git/GCC/master/gcc/cfgrtl.cc:2889
0x105f3fd rtl_verify_flow_info
/home/mjires/git/GCC/master/gcc/cfgrtl.cc:3134
0x10448c2 verify_flow_info()
/home/mjires/git/GCC/master/gcc/cfghooks.cc:283
0x103b2fa checking_verify_flow_info()
/home/mjires/git/GCC/master/gcc/cfghooks.h:214
0x2956e01 try_optimize_cfg
/home/mjires/git/GCC/master/gcc/cfgcleanup.cc:2980
0x29572da cleanup_cfg(int)
/home/mjires/git/GCC/master/gcc/cfgcleanup.cc:3143
0x1e2bd7f ldp_fusion_destroy
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2426
0x1e2cb02 ldp_fusion()
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2650
0x1e2cbec execute
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2698
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking : (reconfigured)
/home/mjires/git/GCC/master/configure --prefix=/home/mjires/built/master
--target=aarch64-linux-gnu --disable-bootstrap --enable-languages=c,c++,fortran
--disable-multilib --disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231220 (experimental) (GCC)

[Bug target/113083] New: [14 Regression][arm] ICE in fold_convert_loc, at fold-const.cc:2602 since r14-5979-g99d114c15523e0

2023-12-19 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113083

Bug ID: 113083
   Summary: [14 Regression][arm] ICE in fold_convert_loc, at
fold-const.cc:2602 since r14-5979-g99d114c15523e0
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: polacek at redhat dot com
  Target Milestone: ---
Target: arm

Compiling reduced testcase g++.dg/cpp0x/constexpr-98295.C results in ICE since
r14-5979-g99d114c15523e0.

$ cat constexpr-98295.C
struct A { constexpr A(); };

void f() {
  A b;
}

constexpr A::A() {}


$ arm-linux-gnueabi-g++ constexpr-98295.C -Os
constexpr-98295.C: In constructor ‘constexpr A::A()’:
constexpr-98295.C:7:19: internal compiler error: in fold_convert_loc, at
fold-const.cc:2602
7 | constexpr A::A() {}
  |   ^
0x1517af9 fold_convert_loc(unsigned int, tree_node*, tree_node*)
/home/mjires/git/GCC/master/gcc/fold-const.cc:2602
0x1613814 gimplify_modify_expr
/home/mjires/git/GCC/master/gcc/gimplify.cc:6353
0x16471a1 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/mjires/git/GCC/master/gcc/gimplify.cc:17640
0x1617f67 gimplify_stmt(tree_node**, gimple**)
/home/mjires/git/GCC/master/gcc/gimplify.cc:7477
0x15ff631 gimplify_and_add(tree_node*, gimple**)
/home/mjires/git/GCC/master/gcc/gimplify.cc:493
0x16045a5 gimplify_return_expr
/home/mjires/git/GCC/master/gcc/gimplify.cc:1883
0x16482da gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/mjires/git/GCC/master/gcc/gimplify.cc:17902
0x1617f67 gimplify_stmt(tree_node**, gimple**)
/home/mjires/git/GCC/master/gcc/gimplify.cc:7477
0x1605a4d gimplify_statement_list
/home/mjires/git/GCC/master/gcc/gimplify.cc:
0x1649002 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/mjires/git/GCC/master/gcc/gimplify.cc:18085
0x1617f67 gimplify_stmt(tree_node**, gimple**)
/home/mjires/git/GCC/master/gcc/gimplify.cc:7477
0x1603668 gimplify_bind_expr
/home/mjires/git/GCC/master/gcc/gimplify.cc:1614
0x1647f13 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/mjires/git/GCC/master/gcc/gimplify.cc:17841
0x1617f67 gimplify_stmt(tree_node**, gimple**)
/home/mjires/git/GCC/master/gcc/gimplify.cc:7477
0x164bdb4 gimplify_body(tree_node*, bool)
/home/mjires/git/GCC/master/gcc/gimplify.cc:18907
0x164c6a9 gimplify_function_tree(tree_node*)
/home/mjires/git/GCC/master/gcc/gimplify.cc:19106
0x13a0cb1 cgraph_node::analyze()
/home/mjires/git/GCC/master/gcc/cgraphunit.cc:685
0x13a2d6d analyze_functions
/home/mjires/git/GCC/master/gcc/cgraphunit.cc:1248
0x13a62f3 symbol_table::finalize_compilation_unit()
/home/mjires/git/GCC/master/gcc/cgraphunit.cc:2555
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ arm-linux-gnueabi-g++ -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-g++
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/arm-linux-gnueabi/14.0.0/lto-wrapper
Target: arm-linux-gnueabi
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=arm-linux-gnueabi
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231219 (experimental) (GCC)

[Bug target/113062] New: [14 Regression][aarch64] ICE in fuse_pair, at config/aarch64/aarch64-ldp-fusion.cc:1456 since r14-6605-gc0911c6b357ba9

2023-12-18 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113062

Bug ID: 113062
   Summary: [14 Regression][aarch64] ICE in fuse_pair, at
config/aarch64/aarch64-ldp-fusion.cc:1456 since
r14-6605-gc0911c6b357ba9
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: acoplan at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64

Compiling reduced testcase gcc.dg/compat/struct-return-10_x.c results in ICE
since r14-6605-gc0911c6b357ba9.

$ cat struct-return-10_x.c
long double foo;
double bar;
void abort();
void check() {
  if (foo == bar)
abort();
}


$ aarch64-linux-gnu-gcc struct-return-10_x.c -Oz -fharden-conditional-branches
during RTL pass: ldp_fusion
struct-return-10_x.c: In function ‘check’:
struct-return-10_x.c:7:1: internal compiler error: in fuse_pair, at
config/aarch64/aarch64-ldp-fusion.cc:1456
7 | }
  | ^
0x1e2c0c8 ldp_bb_info::fuse_pair(bool, unsigned int, int, rtl_ssa::insn_info*,
rtl_ssa::insn_info*, base_cand&, rtl_ssa::insn_range_info const&)
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:1456
0x1e2da97 ldp_bb_info::try_fuse_pair(bool, unsigned int, rtl_ssa::insn_info*,
rtl_ssa::insn_info*)
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2217
0x1e2de0f ldp_bb_info::merge_pairs(std::__cxx11::list >&, std::__cxx11::list >&, bool, unsigned int)
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2306
0x1e2e034 ldp_bb_info::transform_for_base(int, access_group&)
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2339
0x1e306c8 void
ldp_bb_info::traverse_base_map >, access_group,
simple_hashmap_traits > >, access_group> >
>(ordered_hash_map >,
access_group,
simple_hashmap_traits > >, access_group> >&)
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2398
0x1e2e27c ldp_bb_info::transform()
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2405
0x1e2968c ldp_fusion_bb(rtl_ssa::bb_info*)
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2634
0x1e29716 ldp_fusion()
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2643
0x1e29828 execute
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-ldp-fusion.cc:2693
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231218 (experimental) (GCC)

[Bug target/113061] New: [14 Regression][aarch64] ICE in lra_create_new_reg_with_unique_value, at lra.cc:192 since r14-6605-gc0911c6b357ba9

2023-12-18 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113061

Bug ID: 113061
   Summary: [14 Regression][aarch64] ICE in
lra_create_new_reg_with_unique_value, at lra.cc:192
since r14-6605-gc0911c6b357ba9
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: acoplan at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64

Compiling reduced testcase gfortran.dg/PR100911.f90 results in ICE since
r14-6605-gc0911c6b357ba9.


$ cat PR100911.f90
module module_foo
  use iso_c_binding
  contains
  subroutine foo(a) bind(c)
type(c_ptr)  a(..)
select rank(a)
end select
call bar
  end
end


$ aarch64-linux-gnu-gfortran PR100911.f90 -fno-move-loop-invariants -Oz
during RTL pass: reload
PR100911.f90:9:5:

9 |   end
  | ^
internal compiler error: in lra_create_new_reg_with_unique_value, at lra.cc:192
0x1578f06 lra_create_new_reg_with_unique_value(machine_mode, rtx_def*,
reg_class, HARD_REG_SET*, char const*)
/home/mjires/git/GCC/master/gcc/lra.cc:192
0x15792cd lra_create_new_reg(machine_mode, rtx_def*, reg_class, HARD_REG_SET*,
char const*)
/home/mjires/git/GCC/master/gcc/lra.cc:235
0x1588e7a get_reload_reg
/home/mjires/git/GCC/master/gcc/lra-constraints.cc:737
0x1593bf4 curr_insn_transform
/home/mjires/git/GCC/master/gcc/lra-constraints.cc:4663
0x1596278 lra_constraints(bool)
/home/mjires/git/GCC/master/gcc/lra-constraints.cc:5414
0x157eb50 lra(_IO_FILE*, int)
/home/mjires/git/GCC/master/gcc/lra.cc:2442
0x1526e43 do_reload
/home/mjires/git/GCC/master/gcc/ira.cc:5973
0x15272e0 execute
/home/mjires/git/GCC/master/gcc/ira.cc:6161
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ aarch64-linux-gnu-gfortran -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gfortran
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231218 (experimental) (GCC)

[Bug rtl-optimization/113002] New: ICE in commit_one_edge_insertion, at cfgrtl.cc:2095 with new -finline-stringops

2023-12-13 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113002

Bug ID: 113002
   Summary: ICE in commit_one_edge_insertion, at cfgrtl.cc:2095
with new -finline-stringops
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: aoliva at gcc dot gnu.org
  Target Milestone: ---

Compiling reduced testcase gcc.dg/pr76783.c results in ICE with new
-finline-stringops since its addition r14-5946-g1ff6d9f7428b06.
Happens with riscv64-linux-gnu-gcc and ppc64le-linux-gnu-gcc.


$ cat pr76783.c
typedef __int128 v64u128 __attribute__((vector_size(64)));
int c;
v64u128 u;
void foo() {
  if (c)
u = (v64u128){0};
  else
u = (v64u128){1};
}


$ riscv64-linux-gnu-gcc pr76783.c -finline-stringops -Os
during RTL pass: expand
pr76783.c: In function ‘foo’:
pr76783.c:9:1: internal compiler error: in commit_one_edge_insertion, at
cfgrtl.cc:2095
9 | }
  | ^
0x1286438 commit_one_edge_insertion(edge_def*)
/home/mjires/git/GCC/master/gcc/cfgrtl.cc:2095
0x12864bf commit_edge_insertions()
/home/mjires/git/GCC/master/gcc/cfgrtl.cc:2127
0x126337c execute
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:6926
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ riscv64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=riscv64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/riscv64-linux-gnu/14.0.0/lto-wrapper
Target: riscv64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=riscv64-linux-gnu
--disable-bootstrap --enable-languages=c,c++ --disable-multilib
--disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231213 (experimental) (GCC)

[Bug target/112990] New: [14 Regression][s390x] ICE in related_vector_mode, at stor-layout.cc:539 since r14-3381-g27de9aa152141e

2023-12-12 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112990

Bug ID: 112990
   Summary: [14 Regression][s390x] ICE in related_vector_mode, at
stor-layout.cc:539 since r14-3381-g27de9aa152141e
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: rguenther at suse dot de
  Target Milestone: ---
Target: s390x

Compiling reduced testcase gcc.target/s390/vector/reverse-elements-6.c with
s390x cross compiler results in ICE since r14-3381-g27de9aa152141e.


$ cat reverse-elements-6.c
typedef long __attribute__((vector_size(16))) V2DI;
V2DI v2di_x;
void v2di() {
  V2DI y, z;
  for (int i = 0; i < 2; ++i)
z[i] = y[1];
  v2di_x = z;
}


$ s390x-linux-gnu-gcc reverse-elements-6.c -O1
during RTL pass: expand
reverse-elements-6.c: In function ‘v2di’:
reverse-elements-6.c:7:10: internal compiler error: in related_vector_mode, at
stor-layout.cc:539
7 |   v2di_x = z;
  |   ~~~^~~
0x15dd230 related_vector_mode(machine_mode, scalar_mode, poly_int<1u, unsigned
long>)
/home/mjires/git/GCC/master/gcc/stor-layout.cc:539
0x1428a35 qimode_for_vec_perm(machine_mode)
/home/mjires/git/GCC/master/gcc/optabs-query.cc:358
0x141db61 expand_vec_perm_const(machine_mode, rtx_def*, rtx_def*,
int_vector_builder > const&, machine_mode, rtx_def*)
/home/mjires/git/GCC/master/gcc/optabs.cc:6445
0x106f66f expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
/home/mjires/git/GCC/master/gcc/expr.cc:10844
0x1070df4 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/mjires/git/GCC/master/gcc/expr.cc:11216
0x1068fa1 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
/home/mjires/git/GCC/master/gcc/expr.cc:9407
0x105debf store_expr(tree_node*, rtx_def*, int, bool, bool)
/home/mjires/git/GCC/master/gcc/expr.cc:6709
0x105c5ff expand_assignment(tree_node*, tree_node*, bool)
/home/mjires/git/GCC/master/gcc/expr.cc:6430
0xec1ec7 expand_gimple_stmt_1
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:3960
0xec22b5 expand_gimple_stmt
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:4058
0xeca6e0 expand_gimple_basic_block
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:6114
0xecca96 execute
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:6849
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ s390x-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=s390x-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/s390x-linux-gnu/14.0.0/lto-wrapper
Target: s390x-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=s390x-linux-gnu --disable-bootstrap
--enable-languages=c,c++ --disable-multilib --disable-libsanitizer
--enable-checking : (reconfigured) /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=s390x-linux-gnu --disable-bootstrap
--enable-languages=c,c++ --disable-multilib --disable-libsanitizer
--enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231212 (experimental) (GCC)

[Bug target/112987] [14 Regression][aarch64] ICE in aarch64_do_track_speculation, at config/aarch64/aarch64-speculation.cc:214 since r14-5886-g426fddcbdad674

2023-12-12 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112987

--- Comment #1 from Michal Jireš  ---
Sorry for initially reporting with outdated GCC. Identical ICE is still present
with:

$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++ --disable-multilib
--disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231212 (experimental) (GCC)

[Bug target/112987] New: [14 Regression][aarch64] ICE in aarch64_do_track_speculation, at config/aarch64/aarch64-speculation.cc:214 since r14-5886-g426fddcbdad674

2023-12-12 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112987

Bug ID: 112987
   Summary: [14 Regression][aarch64] ICE in
aarch64_do_track_speculation, at
config/aarch64/aarch64-speculation.cc:214 since
r14-5886-g426fddcbdad674
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: nszabolcs at gmail dot com
  Target Milestone: ---
Target: aarch64

Compiling testcase gcc.target/aarch64/eh_return-2.c results in ICE since
r14-5886-g426fddcbdad674.

$ cat eh_return-2.c
/* { dg-do compile } */
/* { dg-final { scan-assembler "add\tsp, sp, x5" } } */
/* { dg-final { scan-assembler "br\tx6" } } */

void
foo (unsigned long off, void *handler)
{
  __builtin_eh_return (off, handler);
}


$ aarch64-linux-gnu-gcc eh_return-2.c -mtrack-speculation
during RTL pass: speculation
eh_return-2.c: In function ‘foo’:
eh_return-2.c:9:1: internal compiler error: in aarch64_do_track_speculation, at
config/aarch64/aarch64-speculation.cc:214
9 | }
  | ^
0x8f6f6f aarch64_do_track_speculation()
   
/home/mjires/git/GCC/master/gcc/config/aarch64/aarch64-speculation.cc:214
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master-aarch64-linux-gnu/libexec/gcc/aarch64-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--target=aarch64-linux-gnu --disable-bootstrap --enable-languages=c,c++
--disable-multilib --prefix=/home/mjires/built/master-aarch64-linux-gnu/
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231207 (experimental) (GCC)

[Bug target/112904] New: ICE in extract_insn, at recog.cc:2791 with -mxop since r14-4964-g7eed861e8ca3f5

2023-12-07 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112904

Bug ID: 112904
   Summary: ICE in extract_insn, at recog.cc:2791 with -mxop since
r14-4964-g7eed861e8ca3f5
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: liuhongt at gcc dot gnu.org
  Target Milestone: ---

Compiling reduced testcase g++.target/i386/part-vect-vcondhf.C results in ICE
since r14-4964-g7eed861e8ca3f5.

$ cat part-vect-vcondhf.C
typedef _Float16 __attribute__((__vector_size__(8))) __v4hf;
__v4hf cf, df;
__attribute__((__vector_size__(4 * sizeof(short short csf_ne_d;
__v4hf csf_ne() { return csf_ne_d ? cf : df; }


$ g++ part-vect-vcondhf.C -mxop
part-vect-vcondhf.C: In function ‘__v4hf csf_ne()’:
part-vect-vcondhf.C:4:46: error: unrecognizable insn:
4 | __v4hf csf_ne() { return csf_ne_d ? cf : df; }
  |  ^
(insn 10 9 13 2 (set (reg:V4HF 102 [ _6 ])
(if_then_else:V4HF (subreg:V4HF (reg:V4HI 99 [ _2 ]) 0)
(reg:V4HF 100 [ cf.1_3 ])
(reg:V4HF 101 [ df.2_4 ]))) "part-vect-vcondhf.C":4:42 -1
 (nil))
during RTL pass: vregs
part-vect-vcondhf.C:4:46: internal compiler error: in extract_insn, at
recog.cc:2812
0x8da3b4 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/mjires/git/GCC/master/gcc/rtl-error.cc:108
0x8da3d0 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/mjires/git/GCC/master/gcc/rtl-error.cc:116
0x8d88f1 extract_insn(rtx_insn*)
/home/mjires/git/GCC/master/gcc/recog.cc:2812
0xf77cc0 instantiate_virtual_regs_in_insn
/home/mjires/git/GCC/master/gcc/function.cc:1611
0xf77cc0 instantiate_virtual_regs
/home/mjires/git/GCC/master/gcc/function.cc:1994
0xf77cc0 execute
/home/mjires/git/GCC/master/gcc/function.cc:2041
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap --enable-checking
--enable-languages=c,c++,fortran,lto : (reconfigured)
/home/mjires/git/GCC/master/configure --prefix=/home/mjires/built/master
--disable-bootstrap --enable-checking --enable-languages=c,c++,fortran,lto
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231207 (experimental) (GCC)

[Bug middle-end/112784] New: ICE in smallest_mode_for_size, at stor-layout.cc:356 | -finline-stringops

2023-11-30 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112784

Bug ID: 112784
   Summary: ICE in smallest_mode_for_size, at stor-layout.cc:356 |
-finline-stringops
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: aoliva at gcc dot gnu.org
  Target Milestone: ---

Compiling reduced testcase c-c++-common/torture/builtin-clear-padding-2.c
results in ICE with new -finline-stringops.


$ cat builtin-clear-padding-2.c
struct S {
  int e;
} __attribute__((aligned(128)));

int main() {
  struct S s1;
  struct S s2;
  int v = __builtin_memcmp(, , sizeof(s1));
}


$ gcc builtin-clear-padding-2.c -mavx512cd -finline-stringops
during RTL pass: expand
builtin-clear-padding-2.c: In function ‘main’:
builtin-clear-padding-2.c:8:11: internal compiler error: in
smallest_mode_for_size, at stor-layout.cc:356
8 |   int v = __builtin_memcmp(, , sizeof(s1));
  |   ^~
0x10111ef smallest_mode_for_size(poly_int<1u, unsigned long>, mode_class)
/home/mjires/git/GCC/master/gcc/stor-layout.cc:356
0xc19bc2 smallest_int_mode_for_size(poly_int<1u, unsigned long>)
/home/mjires/git/GCC/master/gcc/machmode.h:916
0xc19bc2 emit_block_cmp_via_loop
/home/mjires/git/GCC/master/gcc/expr.cc:2705
0xab40ab expand_builtin_memcmp
/home/mjires/git/GCC/master/gcc/builtins.cc:4825
0xabea1f expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
/home/mjires/git/GCC/master/gcc/builtins.cc:7893
0xc0e9e4 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/mjires/git/GCC/master/gcc/expr.cc:12304
0xc1b4d5 store_expr(tree_node*, rtx_def*, int, bool, bool)
/home/mjires/git/GCC/master/gcc/expr.cc:6711
0xc21870 expand_assignment(tree_node*, tree_node*, bool)
/home/mjires/git/GCC/master/gcc/expr.cc:6432
0xc21870 expand_assignment(tree_node*, tree_node*, bool)
/home/mjires/git/GCC/master/gcc/expr.cc:5947
0xae9026 expand_call_stmt
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:2830
0xae9026 expand_gimple_stmt_1
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:3881
0xae9026 expand_gimple_stmt
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:4045
0xaea307 expand_gimple_basic_block
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:6101
0xaebf66 execute
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:6836
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap --enable-checking
--enable-languages=c,c++,fortran,lto
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231130 (experimental) (GCC)

[Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt

2023-11-27 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112734

Bug ID: 112734
   Summary: ICE verify_gimple failed since
r14-3751-g8c984a1c3693df - BitInt
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: jakub at redhat dot com
  Target Milestone: ---

Compiling reduced testcase gcc.dg/torture/bitint-3.c results in ICE.

$ cat bitint-3.c
_BitInt(128) out;
void main() {
  _BitInt(8) q[1];
  out -= 1;
}


$ gcc bitint-3.c -fnon-call-exceptions -ftrapv
bitint-3.c: In function ‘main’:
bitint-3.c:2:6: error: statement marked for throw in middle of block
2 | void main() {
  |  ^~~~
_7 = _8 + -1;
during GIMPLE pass: bitintlower0
bitint-3.c:2:6: internal compiler error: verify_gimple failed
0x105897d verify_gimple_in_cfg(function*, bool, bool)
/home/mjires/git/GCC/master/gcc/tree-cfg.cc:5662
0xee8ad4 execute_function_todo
/home/mjires/git/GCC/master/gcc/passes.cc:2088
0xee902e execute_todo
/home/mjires/git/GCC/master/gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap --enable-checking
--enable-languages=c,c++,fortran,lto
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231127 (experimental) (GCC)

[Bug middle-end/112679] New: ICE in expand_float, at optabs.cc:5724 with bitint

2023-11-23 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112679

Bug ID: 112679
   Summary: ICE in expand_float, at optabs.cc:5724 with bitint
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: jakub at redhat dot com
  Target Milestone: ---

Compiling testsuite/gcc.dg/bitint-35.c
ICE since initial commits - r14-3751-g8c984a1c3693df.


$ gcc bitint-35.c -frounding-math
bitint-35.c: In function ‘foo’:
bitint-35.c:12:19: warning: overflow in conversion from ‘_BitInt(30)’ to
‘_BitInt(27)’ changes value from ‘-390288573’ to ‘12364611’ [-Woverflow]
   12 |   _BitInt(27) d = -390288573wb; /* { dg-warning
"overflow in conversion from '_BitInt\\\(30\\\)' to '_BitInt\\\(27\\\)' changes
value from '-390288573' to '12364611'" } */
  |   ^
bitint-35.c:13:28: warning: conversion from ‘unsigned _BitInt(29)’ to ‘unsigned
_BitInt(27)’ changes value from ‘309641337’ to ‘41205881’ [-Woverflow]
   13 |   unsigned _BitInt(27) e = 309641337uwb;/* { dg-warning
"conversion from 'unsigned _BitInt\\\(29\\\)' to 'unsigned _BitInt\\\(27\\\)'
changes value from '309641337' to '41205881'" } */
  |^~~~
bitint-35.c:16:19: warning: overflow in conversion from ‘int’ to ‘_BitInt(27)’
changes value from ‘-390288573’ to ‘12364611’ [-Woverflow]
   16 |   _BitInt(27) h = -390288573;   /* { dg-warning
"overflow in conversion from 'int' to '_BitInt\\\(27\\\)' changes value from
'-390288573' to '12364611'" } */
  |   ^
bitint-35.c:17:28: warning: conversion from ‘unsigned int’ to ‘unsigned
_BitInt(27)’ changes value from ‘309641337’ to ‘41205881’ [-Woverflow]
   17 |   unsigned _BitInt(27) i = 309641337U;  /* { dg-warning
"conversion from 'unsigned int' to 'unsigned _BitInt\\\(27\\\)' changes value
from '309641337' to '41205881'" } */
  |^~
bitint-35.c:20:11: warning: overflow in conversion from ‘_BitInt(64)’ to ‘int’
changes value from ‘-8087431137529383656’ to ‘-1105152744’ [-Woverflow]
   20 |   int l = -8087431137529383656wb;   /* { dg-warning
"overflow in conversion from '_BitInt\\\(64\\\)' to 'int' changes value from
'-8087431137529383656' to '-1105152744'" } */
  |   ^
bitint-35.c:21:20: warning: conversion from ‘unsigned _BitInt(61)’ to ‘unsigned
int’ changes value from ‘1664073919553255778’ to ‘3338058082’ [-Woverflow]
   21 |   unsigned int m = 1664073919553255778uwb;  /* { dg-warning
"conversion from 'unsigned _BitInt\\\(61\\\)' to 'unsigned int' changes value
from '1664073919553255778' to '3338058082'" } */
  |^~
during RTL pass: expand
bitint-35.c:23:12: internal compiler error: in expand_float, at optabs.cc:5729
   23 |   _Float32 n =
51441631083309184313435496923626431699697406185384986811300218556561965470218425783308778801748592322915101142266821623326688106425864884688172114173397118407357447763009120wb;
/* { dg-warning "conversion from '_BitInt\\\(575\\\)' to '_Float32' changes
value from
'0x353eab28b46b03ea99b84f9736cd8dbe5e986915a0383c3cb381c0da41e31b3621c75fd53262bfcb1b0e6251dbf00f3988784e29b08b65640c263e4d0959832a20e2ff5245be1e60'
to '\\\+Inff32'" "" { target bitint575 } } */
  |^
0x7e2b67 expand_float(rtx_def*, rtx_def*, int)
/home/mjires/git/GCC/master/gcc/optabs.cc:5729
0xc06bc8 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
/home/mjires/git/GCC/master/gcc/expr.cc:9945
0xae0440 expand_gimple_stmt_1
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:3983
0xae0440 expand_gimple_stmt
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:4044
0xae65f6 expand_gimple_basic_block
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:6100
0xae7f36 execute
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:6835
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap --enable-checking
--enable-languages=c,c++,fortran,lto
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231123 (experimental) (GCC)

[Bug tree-optimization/112673] New: [14 Regression] ICE verify_gimple failed since r14-5557-g6dd4c703be17fa

2023-11-22 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112673

Bug ID: 112673
   Summary: [14 Regression] ICE verify_gimple failed since
r14-5557-g6dd4c703be17fa
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: jakub at redhat dot com
  Target Milestone: ---

Compiling pr112566-2.c from testsuite.
Bisection points to r14-5557-g6dd4c703be17fa, which also introduced this test.

$ gcc pr112566-2.c -Ofast -mf16c
pr112566-2.c: In function ‘corge’:
pr112566-2.c:10:5: error: ‘bit_field_ref’ of non-mode-precision operand
   10 | int corge (_BitInt(256) x) { return __builtin_ctzg ((unsigned
_BitInt(512)) x); }
  | ^
_18 = BIT_FIELD_REF ;
pr112566-2.c:10:5: error: ‘bit_field_ref’ of non-mode-precision operand
_1 = BIT_FIELD_REF ;
pr112566-2.c:10:5: error: ‘bit_field_ref’ of non-mode-precision operand
_38 = BIT_FIELD_REF ;
during GIMPLE pass: forwprop
pr112566-2.c:10:5: internal compiler error: verify_gimple failed
0x105854d verify_gimple_in_cfg(function*, bool, bool)
/home/mjires/git/GCC/master/gcc/tree-cfg.cc:5662
0xee86b4 execute_function_todo
/home/mjires/git/GCC/master/gcc/passes.cc:2088
0xee8c0e execute_todo
/home/mjires/git/GCC/master/gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.

$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/mjires/built/master/bin/gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap --enable-checking
--enable-languages=c,c++,fortran,lto
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231122 (experimental) (GCC)

[Bug tree-optimization/112464] New: [14 Regression] ICE avx512 with -ftrapv since r14-5076

2023-11-09 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112464

Bug ID: 112464
   Summary: [14 Regression] ICE avx512 with -ftrapv since r14-5076
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: rdapp at gcc dot gnu.org
  Target Milestone: ---

Following reduction of testcase avx-vandpd-1.c causes ICE with -mavx512dq
-ftrapv
Bisection points to r14-5076

$ cat included.c
long *e;
int n, i, err;
void fn() {
  for (; i < n; i++)
if (e[i])
  err++;
}

$ gcc included.c -Ofast -mavx512dq -ftrapv
during GIMPLE pass: vect
included.c: In function ‘fn’:
included.c:3:6: internal compiler error: in vect_finish_replace_stmt, at
tree-vect-stmts.cc:1353
3 | void fn() {
  |  ^~
0x91fc95 vect_finish_replace_stmt(vec_info*, _stmt_vec_info*, gimple*)
/home/mjires/git/GCC/master/gcc/tree-vect-stmts.cc:1353
0x1296bd6 vectorize_fold_left_reduction
/home/mjires/git/GCC/master/gcc/tree-vect-loop.cc:7191
0x1296bd6 vect_transform_reduction(_loop_vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, gimple**, _slp_tree*)
/home/mjires/git/GCC/master/gcc/tree-vect-loop.cc:8456
0x1fac0f5 vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
/home/mjires/git/GCC/master/gcc/tree-vect-stmts.cc:13069
0x1287d1f vect_transform_loop_stmt
/home/mjires/git/GCC/master/gcc/tree-vect-loop.cc:11325
0x12acf13 vect_transform_loop(_loop_vec_info*, gimple*)
/home/mjires/git/GCC/master/gcc/tree-vect-loop.cc:11770
0x12ee5a1 vect_transform_loops
/home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1006
0x12eebac try_vectorize_loop_1
/home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1152
0x12eebac try_vectorize_loop
/home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1182
0x12eef34 execute
/home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1298
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.


$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/mjires/built/master/bin/gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231109 (experimental) (GCC)

[Bug tree-optimization/111943] New: ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy

2023-10-23 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111943

Bug ID: 111943
   Summary: ICE in gimple_split_edge, at tree-cfg.cc:3019 on
20050510-1.c with new -fharden-control-flow-redundancy
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: aoliva at gcc dot gnu.org
  Target Milestone: ---

Following testcase causes ICE with new -fharden-control-flow-redundancy

$ cat 20050510-1.c
/* { dg-require-effective-target indirect_jumps } */
/* { dg-require-effective-target label_values } */

void bar (int k)
{
  void *label = (k) ? & : &
  if (k)
goto *label;

x:
  if (k)
dont_remove ();
y:
  return;
}



$ gcc 20050510-1.c -fharden-control-flow-redundancy
--param=max-jump-thread-duplication-stmts=0 -Ofast
20050510-1.c: In function ‘bar’:
20050510-1.c:12:5: warning: implicit declaration of function ‘dont_remove’
[-Wimplicit-function-declaration]
   12 | dont_remove ();
  | ^~~
during GIMPLE pass: hardcfr
20050510-1.c:4:6: internal compiler error: in gimple_split_edge, at
tree-cfg.cc:3019
4 | void bar (int k)
  |  ^~~
0x7f2c1b gimple_split_edge
/home/mjires/git/GCC/master/gcc/tree-cfg.cc:3019
0xad6acb split_edge(edge_def*)
/home/mjires/git/GCC/master/gcc/cfghooks.cc:670
0xc83916 gimple_find_edge_insert_loc
/home/mjires/git/GCC/master/gcc/gimple-iterator.cc:829
0xc8457b gsi_insert_seq_on_edge_immediate(edge_def*, gimple*)
/home/mjires/git/GCC/master/gcc/gimple-iterator.cc:873
0x1d5468e rt_bb_visited::insert_exit_check_on_edge(gimple*, edge_def*)
/home/mjires/git/GCC/master/gcc/gimple-harden-control-flow.cc:706
0x1d5468e rt_bb_visited::check(auto_vec&, int, auto_sbitmap
const&)
/home/mjires/git/GCC/master/gcc/gimple-harden-control-flow.cc:807
0x1d530b6 execute
/home/mjires/git/GCC/master/gcc/gimple-harden-control-flow.cc:1476
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.

$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/mjires/checks/master/bin/gcc
COLLECT_LTO_WRAPPER=/home/mjires/checks/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/checks/master
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231023 (experimental) (GCC)

[Bug rtl-optimization/111942] New: ICE in rtl_split_edge, at cfgrtl.cc:1943 on pr98096.c with new -fharden-control-flow-redundancy

2023-10-23 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111942

Bug ID: 111942
   Summary: ICE in rtl_split_edge, at cfgrtl.cc:1943 on pr98096.c
with new -fharden-control-flow-redundancy
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: aoliva at gcc dot gnu.org
  Target Milestone: ---

Following testcase causes ICE with new -fharden-control-flow-redundancy

$ cat pr98096.c
/* Test for correct naming of label operands in asm goto in case of presence of
   input/output operands. */
/* { dg-do compile { target lra } } */
int i, j;
int f(void) {
  asm goto ("# %0 %2" : "+r" (i) ::: jmp);
  i += 2;
  asm goto ("# %0 %1 %l[jmp]" : "+r" (i), "+r" (j) ::: jmp);
 jmp: return i;
}



$ gcc pr98096.c -fharden-control-flow-redundancy -fnon-call-exceptions
during RTL pass: expand
pr98096.c: In function ‘f’:
pr98096.c:10:1: internal compiler error: in rtl_split_edge, at cfgrtl.cc:1943
   10 | }
  | ^
0x755d25 rtl_split_edge
/home/mjires/git/GCC/master/gcc/cfgrtl.cc:1943
0xad6acb split_edge(edge_def*)
/home/mjires/git/GCC/master/gcc/cfghooks.cc:670
0xaec884 commit_one_edge_insertion(edge_def*)
/home/mjires/git/GCC/master/gcc/cfgrtl.cc:2058
0xaf14e1 commit_edge_insertions()
/home/mjires/git/GCC/master/gcc/cfgrtl.cc:2127
0xad2a1d execute
/home/mjires/git/GCC/master/gcc/cfgexpand.cc:6906
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.

$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/mjires/checks/master/bin/gcc
COLLECT_LTO_WRAPPER=/home/mjires/checks/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/checks/master
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231023 (experimental) (GCC)

[Bug tree-optimization/111891] New: ICE regression, in vectorizable_simd_clone_call, at tree-vect-stmts.cc:4073 on x86_64, gfortran

2023-10-20 Thread mjires at suse dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111891

Bug ID: 111891
   Summary: ICE regression, in vectorizable_simd_clone_call, at
tree-vect-stmts.cc:4073 on x86_64, gfortran
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mjires at suse dot cz
CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

Following minimized example leads to ICE on x86_64 with -O[2,3,fast}
-march=native.

Bisection points to commit r14-4628-g63eaccd114393f
(63eaccd114393f4692976bb78b30148e6d77a89e).



PARAMETER (NX=3, G=1.4)
DIMENSION T(NX,NX), P(NX,NX)
INTEGER Apx
COMMON P, T

DO i = 1, 3
  IF  (i < 0.0 ) THEN
 P(Apx,i) = i**G
 T(Apx,i) = i**G
  ELSE
 P(Apx,i) = 0
 T(Apx,i) = 0
  ENDIF
ENDDO
END




$ gfortran -v -O2 -march=native air.f90
Driving: /home/mjires/checks/master/bin/gfortran -v -O2 -march=native air.f90
-l gfortran -l m -shared-libgcc
Using built-in specs.
COLLECT_GCC=/home/mjires/checks/master/bin/gfortran
COLLECT_LTO_WRAPPER=/home/mjires/checks/master/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master//configure
--prefix=/home/mjires/checks//master : (reconfigured)
/home/mjires/git/GCC/master//configure --prefix=/home/mjires/checks//master
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231020 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-O2' '-march=native' '-shared-libgcc' '-dumpdir' 'a-'
 /home/mjires/checks/master/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.0/f951
air.f90 -march=znver3 -mmmx -mpopcnt -msse -msse2 -msse3 -mssse3 -msse4.1
-msse4.2 -mavx -mavx2 -msse4a -mno-fma4 -mno-xop -mfma -mno-avx512f -mbmi
-mbmi2 -maes -mpclmul -mno-avx512vl -mno-avx512bw -mno-avx512dq -mno-avx512cd
-mno-avx512er -mno-avx512pf -mno-avx512vbmi -mno-avx512ifma -mno-avx5124vnniw
-mno-avx5124fmaps -mno-avx512vpopcntdq -mno-avx512vbmi2 -mno-gfni -mvpclmulqdq
-mno-avx512vnni -mno-avx512bitalg -mno-avx512bf16 -mno-avx512vp2intersect
-mno-3dnow -madx -mabm -mno-cldemote -mclflushopt -mclwb -mclzero -mcx16
-mno-enqcmd -mf16c -mfsgsbase -mfxsr -mno-hle -msahf -mno-lwp -mlzcnt -mmovbe
-mno-movdir64b -mno-movdiri -mmwaitx -mno-pconfig -mpku -mno-prefetchwt1
-mprfchw -mno-ptwrite -mrdpid -mrdrnd -mrdseed -mno-rtm -mno-serialize -mno-sgx
-msha -mshstk -mno-tbm -mno-tsxldtrk -mvaes -mno-waitpkg -mwbnoinvd -mxsave
-mxsavec -mxsaveopt -mxsaves -mno-amx-tile -mno-amx-int8 -mno-amx-bf16
-mno-uintr -mno-hreset -mno-kl -mno-widekl -mno-avxvnni -mno-avx512fp16
-mno-avxifma -mno-avxvnniint8 -mno-avxneconvert -mno-cmpccxadd -mno-amx-fp16
-mno-prefetchi -mno-raoint -mno-amx-complex -mno-avxvnniint16 -mno-sm3
-mno-sha512 -mno-sm4 -mno-apxf -mno-usermsr --param l1-cache-size=32 --param
l1-cache-line-size=64 --param l2-cache-size=512 -mtune=znver3 -quiet -dumpdir
a- -dumpbase air.f90 -dumpbase-ext .f90 -O2 -version -fintrinsic-modules-path
/home/mjires/checks/master/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.0.0/finclude
-fpre-include=/usr/include/finclude/math-vector-fortran.h -o /tmp/ccmbn6T4.s
GNU Fortran (GCC) version 14.0.0 20231020 (experimental) (x86_64-pc-linux-gnu)
compiled by GNU C version 14.0.0 20231020 (experimental), GMP version
6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.26-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
during GIMPLE pass: vect
air.f90:15:3:

   15 | END
  |   ^
internal compiler error: in vectorizable_simd_clone_call, at
tree-vect-stmts.cc:4073
0x91776b vectorizable_simd_clone_call
/home/mjires/git/GCC/master/gcc/tree-vect-stmts.cc:4073
0x20a5e7a vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
_slp_instance*, vec*)
/home/mjires/git/GCC/master/gcc/tree-vect-stmts.cc:12850
0x135a68e vect_slp_analyze_node_operations_1
/home/mjires/git/GCC/master/gcc/tree-vect-slp.cc:6105
0x135a68e vect_slp_analyze_node_operations
/home/mjires/git/GCC/master/gcc/tree-vect-slp.cc:6304
0x135a5af vect_slp_analyze_node_operations
/home/mjires/git/GCC/master/gcc/tree-vect-slp.cc:6283
0x135c369 vect_slp_analyze_operations(vec_info*)
/home/mjires/git/GCC/master/gcc/tree-vect-slp.cc:6555
0x132b391 vect_analyze_loop_2
/home/mjires/git/GCC/master/gcc/tree-vect-loop.cc:2905
0x132d59e vect_analyze_loop_1
/home/mjires/git/GCC/master/gcc/tree-vect-loop.cc:3429
0x132dd44 vect_analyze_loop(loop*, vec_info_shared*)
/home/mjires/git/GCC/master/gcc/tree-vect-loop.cc:3583
0x1371555 try_vectorize_loop_1
/home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1066
0x1371555 try_vectorize_loop
/home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1182
0x1371dc4 execute