public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107835] New: [13 Regression] ICE in build2, at tree.cc:5020 since r13-254-gdd3c7873a61019e9
@ 2022-11-23 13:54 marxin at gcc dot gnu.org
  2022-11-23 13:54 ` [Bug tree-optimization/107835] " marxin at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-23 13:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107835
           Summary: [13 Regression] ICE in build2, at tree.cc:5020 since
                    r13-254-gdd3c7873a61019e9
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: sayle at gcc dot gnu.org
  Target Milestone: ---

The following crashes:

$ cat test-loop2.ii
template <typename> struct __new_allocator;
template <typename> struct allocator_traits;
template <typename _Tp> struct allocator_traits<__new_allocator<_Tp>> {
  using pointer = _Tp *;
};
struct __alloc_traits : allocator_traits<__new_allocator<int>> {};
template <typename _ForwardIterator, typename _Size, typename _Tp>
_ForwardIterator __uninitialized_default_n_a(_ForwardIterator __first, _Size,
                                             _Tp) {
  unsigned __n;
  for (; __n; --__n, ++__first)
    ;
  return __first;
}
struct _Vector_impl_data {
  __alloc_traits::pointer _M_finish;
  _Vector_impl_data() : _M_finish() {}
};
struct _Vector_base {
  ~_Vector_base();
  _Vector_impl_data _M_impl;
} resize___new_size;
struct Trans_NS_std_vector : _Vector_base {
  void resize() {
    _M_impl._M_finish =
        __uninitialized_default_n_a(_M_impl._M_finish, resize___new_size, 0);
  }
};
template <class> using vector = Trans_NS_std_vector;
struct Platform {
  static void get(vector<Platform> *platforms) { platforms->resize(); }
};
main() {
  vector<Platform> platformList;
  Platform::get(&platformList);
}

$ g++ test-loop2.ii -O2 -fwhole-program -c -w
during GIMPLE pass: sccp
test-loop2.ii: In function ‘int main()’:
test-loop2.ii:33:1: internal compiler error: in build2, at tree.cc:5008
   33 | main() {
      | ^~~~
0x86bfa2 build2(tree_code, tree_node*, tree_node*, tree_node*)
        /home/marxin/Programming/gcc/gcc/tree.cc:5008
0xe0528f build2_loc
        /home/marxin/Programming/gcc/gcc/tree.h:4606
0xe0528f fold_build2_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
        /home/marxin/Programming/gcc/gcc/fold-const.cc:13820
0xe0526a fold_build2_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
        /home/marxin/Programming/gcc/gcc/fold-const.cc:13818
0x1fe6a65 chrec_apply(unsigned int, tree_node*, tree_node*)
        /home/marxin/Programming/gcc/gcc/tree-chrec.cc:632
0x1252b8b compute_overall_effect_of_inner_loop(loop*, tree_node*)
        /home/marxin/Programming/gcc/gcc/tree-scalar-evolution.cc:471
0x1256635 final_value_replacement_loop(loop*)
        /home/marxin/Programming/gcc/gcc/tree-scalar-evolution.cc:3759
0x1305915 execute
        /home/marxin/Programming/gcc/gcc/tree-ssa-loop.cc:411
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

end of thread, other threads:[~2022-11-30 10:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23 13:54 [Bug tree-optimization/107835] New: [13 Regression] ICE in build2, at tree.cc:5020 since r13-254-gdd3c7873a61019e9 marxin at gcc dot gnu.org
2022-11-23 13:54 ` [Bug tree-optimization/107835] " marxin at gcc dot gnu.org
2022-11-23 20:57 ` rguenth at gcc dot gnu.org
2022-11-29 14:26 ` jakub at gcc dot gnu.org
2022-11-29 14:37 ` jakub at gcc dot gnu.org
2022-11-30 10:46 ` cvs-commit at gcc dot gnu.org
2022-11-30 10:46 ` 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).