public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113210] New: [14] RISC-V vector ICE: tree check: expected integer_cst, have cond_expr in get_len, at tree.h:6481
@ 2024-01-02 23:33 patrick at rivosinc dot com
  2024-01-02 23:38 ` [Bug target/113210] " juzhe.zhong at rivai dot ai
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: patrick at rivosinc dot com @ 2024-01-02 23:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113210
           Summary: [14] RISC-V vector ICE: tree check: expected
                    integer_cst, have cond_expr in get_len, at tree.h:6481
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick at rivosinc dot com
  Target Milestone: ---

Created attachment 56982
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56982&action=edit
-freport-bug output

Testcase:
char a, c;
short b;
void d() {
  c = a - 1;
  b = c;
  unsigned short *e = &b;
  while (++*e > 256)
    ;
}

Command:
> /scratch/tc-testing/tc-jan-1-trunk/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O2 red.c -freport-bug

during GIMPLE pass: vect
red.c: In function 'd':
red.c:3:6: internal compiler error: tree check: expected integer_cst, have
cond_expr in get_len, at tree.h:6481
    3 | void d() {
      |      ^
0xab8132 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../../gcc/gcc/tree.cc:8952
0xc97cb2 tree_check(tree_node const*, char const*, int, char const*, tree_code)
        ../../../gcc/gcc/tree.h:3900
0xc97cb2 wi::extended_tree<131072>::get_len() const
        ../../../gcc/gcc/tree.h:6481
0xc97cb2 wi::int_traits<generic_wide_int<wi::extended_tree<131072> >
>::decompose(long*, unsigned int, generic_wide_int<wi::extended_tree<131072> >
const&)
        ../../../gcc/gcc/wide-int.h:1050
0xc97cb2 wide_int_ref_storage<true,
false>::wide_int_ref_storage<generic_wide_int<wi::extended_tree<131072> >
>(generic_wide_int<wi::extended_tree<131072> > const&, unsigned int)
        ../../../gcc/gcc/wide-int.h:1099
0xc97cb2 generic_wide_int<wide_int_ref_storage<true, false>
>::generic_wide_int<generic_wide_int<wi::extended_tree<131072> >
>(generic_wide_int<wi::extended_tree<131072> > const&, unsigned int)
        ../../../gcc/gcc/wide-int.h:855
0xc97cb2 wi::binary_traits<generic_wide_int<wi::extended_tree<131072> >, int,
wi::int_traits<generic_wide_int<wi::extended_tree<131072> > >::precision_type,
wi::int_traits<int>::precision_type>::result_type
wi::add<generic_wide_int<wi::extended_tree<131072> >,
int>(generic_wide_int<wi::extended_tree<131072> > const&, int const&)
        ../../../gcc/gcc/wide-int.h:2871
0x156f0e7 wi::binary_traits<generic_wide_int<wi::extended_tree<131072> >, int,
wi::int_traits<generic_wide_int<wi::extended_tree<131072> > >::precision_type,
wi::int_traits<int>::precision_type>::operator_result
operator+<generic_wide_int<wi::extended_tree<131072> >,
int>(generic_wide_int<wi::extended_tree<131072> > const&, int const&)
        ../../../gcc/gcc/wide-int.h:3857
0x156f0e7 vect_analyze_loop_costing
        ../../../gcc/gcc/tree-vect-loop.cc:2270
0x157ff01 vect_analyze_loop_2
        ../../../gcc/gcc/tree-vect-loop.cc:3166
0x1581a20 vect_analyze_loop_1
        ../../../gcc/gcc/tree-vect-loop.cc:3461
0x15821b9 vect_analyze_loop(loop*, vec_info_shared*)
        ../../../gcc/gcc/tree-vect-loop.cc:3619
0x15c84d4 try_vectorize_loop_1
        ../../../gcc/gcc/tree-vectorizer.cc:1066
0x15c84d4 try_vectorize_loop
        ../../../gcc/gcc/tree-vectorizer.cc:1182
0x15c8dfc execute
        ../../../gcc/gcc/tree-vectorizer.cc:1298
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Preprocessed source stored into /scratch/tmp/ccdgSv2l.out file, please attach
this to your bugreport.

Godbolt: https://godbolt.org/z/x851M9q7n

The ICE goes away if you change the 256 -> 255

-freport-bug output attached.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-01-09  9:32 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-02 23:33 [Bug target/113210] New: [14] RISC-V vector ICE: tree check: expected integer_cst, have cond_expr in get_len, at tree.h:6481 patrick at rivosinc dot com
2024-01-02 23:38 ` [Bug target/113210] " juzhe.zhong at rivai dot ai
2024-01-02 23:48 ` patrick at rivosinc dot com
2024-01-03  1:33 ` [Bug tree-optimization/113210] [14 Regression] " pinskia at gcc dot gnu.org
2024-01-03  1:34 ` pinskia at gcc dot gnu.org
2024-01-03  1:39 ` pinskia at gcc dot gnu.org
2024-01-03  1:42 ` pinskia at gcc dot gnu.org
2024-01-05 14:37 ` jakub at gcc dot gnu.org
2024-01-05 16:09 ` jakub at gcc dot gnu.org
2024-01-05 16:21 ` jakub at gcc dot gnu.org
2024-01-08  9:44 ` rguenth at gcc dot gnu.org
2024-01-08 10:02 ` jakub at gcc dot gnu.org
2024-01-08 10:09 ` jakub at gcc dot gnu.org
2024-01-08 10:16 ` rguenth at gcc dot gnu.org
2024-01-08 10:18 ` rguenth at gcc dot gnu.org
2024-01-08 10:25 ` rguenth at gcc dot gnu.org
2024-01-08 15:58 ` jakub at gcc dot gnu.org
2024-01-09  8:36 ` rguenth at gcc dot gnu.org
2024-01-09  9:32 ` cvs-commit at gcc dot gnu.org
2024-01-09  9:32 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).